This is a new version of the script that has a database selection and uses
the default version of Ruby (1.8).


#!/bin/bash

#    Copyright (C) 2011  Quiliro Ordусez

#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.

#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see<http://www.gnu.org/licenses/>.

#    quiliro [at] fsfla [dot] org

#    InstantHobo.bash version 0.4
#
#    This program installs Hobo stable version 1.3 on Trisquel distribution
#    of the GNU operating system by installing Ruby version 1.9.3-p0 from
#    source and by using apt-get it installs other binary software packages.

#    Have fun using and modifying this script. Please send me your updates
#    so I can share them with others.

#    Just make a text file named InstantHobo.bash and make it executable by
#    typing:
#    sudo chmod +x InstantHobo.bash
#    Then execute it by typing:
#    ./InstantHobo.bash
#
#    Note: If you want to remove all gems before running this script, type:
#    sudo gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIxsudo
apt-get update

#    Keep hacking!


#    Additional Contributions by Arthur E. Baldwin
#    The mysql2.gem file is not designed to properly choose the correct
#    version number, so it is necessary to include the -v parameter and the
#    desired version number.  Otherwise you will be using this script in
vain.
#    This script has been thoroughly tested primarily on Trisquel 5.0 and on
#    KUbuntu 11.10 (64 bit).  We're leaving it up to others to test and
report
#    their findings on other distros.


echo "Installing stable versions of Ruby and Rubygems"
echo "as well as the git versioning system"
sudo apt-get install ruby rubygems git-core

echo "Setting the path for the gem command for the current user"
echo "PATH="/var/lib/gems/1.8/bin:$PATH"" >> $HOME/.profile

echo "Setting the path for the gem command for future users"
echo "PATH="/var/lib/gems/1.8/bin:$PATH"" >> /etc/profile

echo "Updating currently installed gems"
sudo gem update

echo "Installing Apache web server"
sudo aptitude install apache2


# Choosing the database

echo "          Choose database"
echo "          ------ --------"
echo "Choose one of the following databases:"
echo
echo "[M]ySQL 5"
echo "[S]QLite 3"
echo

read database

case "$database" in

  "M" | "m" )

  echo "Installing mysql2 gem"
  sudo gem install mysql2
  echo "Installing MySQL database management system server"
  sudo aptitude install mysql-server libmysqlclient-dev
  ;;

  "S" | "s" )

  echo "Installing sqlite3"
  sudo aptitude install libsqlite3-dev
  echo "Installing sqlite3 gem"
  sudo gem install sqlite3
  ;;

esac


echo "Installing the Hobo gem"
sudo gem install hobo

# End of script


-- 
Saludos.

Quiliro Ordóñez
(02)2595632
(02)3401517
09-6782520
Si me equivoco, al menos se que soy quién se equivocó y no que me dieron
equivocándome.
Quito, Ecuador

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to