|
1 |
| -set -e |
2 |
| - |
3 |
| -echo "Installs Homebrew for installing other software" |
4 |
| -/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" |
5 |
| -brew update |
6 |
| - |
7 |
| -echo "Installs RVM (Ruby Version Manager) for handling Ruby installation" |
8 |
| -curl -kL get.rvm.io | bash -s stable |
9 |
| -source ~/.rvm/scripts/rvm |
10 |
| - |
11 |
| -echo "Install Ruby" |
12 |
| -rvm install 1.9.3-p194 |
13 |
| -rvm use 1.9.3-p194 --default |
14 |
| - |
15 |
| -gem install bundler --no-rdoc --no-ri |
16 |
| -gem install rails --no-rdoc --no-ri |
17 |
| - |
18 |
| -echo -e "\n- - - - - -\n" |
19 |
| -echo -e "Now we are going to print some information to check that everything is done:\n" |
20 |
| - |
21 |
| -echo -n "Should be brew 0.8 or higher: brew " |
22 |
| -brew -v |
23 |
| -echo -n "Should be sqlite 3.7.3 or higher: sqlite " |
24 |
| -sqlite3 --version |
25 |
| -echo -n "Should be rvm 1.6.32 or higher: " |
26 |
| -rvm --version | sed '/^.*$/N;s/\n//g' | cut -c 1-10 |
27 |
| -echo -n "Should be ruby 1.9.3-p194: " |
28 |
| -ruby -v | cut -d " " -f 2 |
29 |
| -echo -n "Should be Rails 3.2.2 or higher: " |
| 1 | +#!/bin/sh |
| 2 | +PACKAGE_URL="http://dl.dropbox.com/u/132031/tokaidoapp.tgz" |
| 3 | +TOKAIDO_DIR="$HOME/.tokaidoapp" |
| 4 | +RUBY_VERSION="1.9.3-p194" |
| 5 | + |
| 6 | +function mktmpdir() { |
| 7 | +dir=$(mktemp -t tokaido-XXXX) |
| 8 | +rm -rf $dir |
| 9 | +mkdir -p $dir |
| 10 | +echo $dir |
| 11 | +} |
| 12 | + |
| 13 | +tmpdir=$(mktmpdir) |
| 14 | +cd $tmpdir |
| 15 | +echo "Downloading Tokaido.app" |
| 16 | +curl $PACKAGE_URL -\# -o - | tar zxf - |
| 17 | + |
| 18 | +echo "Setting up Tokaido.app" |
| 19 | +mkdir -p $TOKAIDO_DIR |
| 20 | +mkdir -p $TOKAIDO_DIR/rubies |
| 21 | +mkdir -p $TOKAIDO_DIR/gems |
| 22 | +mv .tokaidoapp/rubies/$RUBY_VERSION $TOKAIDO_DIR/rubies/ |
| 23 | +mv .tokaidoapp/gems/$RUBY_VERSION $TOKAIDO_DIR/gems/ |
| 24 | +mv .tokaidoapp/tokaidoapp.sh $TOKAIDO_DIR/ |
| 25 | + |
| 26 | +rm -rf $tmpdir |
| 27 | + |
| 28 | +echo "[[ -s $HOME/.tokaidoapp/tokaidoapp.sh ]] && source $HOME/.tokaidoapp/tokaidoapp.sh" >> $HOME/.profile |
| 29 | +source $HOME/.tokaidoapp/tokaidoapp.sh |
| 30 | + |
| 31 | +ruby -v |
30 | 32 | rails -v
|
31 |
| -echo -e "\n- - - - - -\n" |
32 |
| - |
33 |
| -echo "If the versions match, everything is installed correctly. If the versions |
34 |
| -don't match or errors are shown, something went wrong with the automated process |
35 |
| -and we will help you do the installation the manual way at the event. |
36 |
| -
|
37 |
| -Congrats!" |
| 33 | +echo "Done!" |
| 34 | +echo "Please restart your terminal." |
0 commit comments