From 7971fe5cb9731f3856896fbd38b0d81c0c5deb0c Mon Sep 17 00:00:00 2001 From: Miles Gould Date: Mon, 24 Dec 2012 14:05:42 +0000 Subject: [PATCH 1/3] Script to perform growstuff checkout and setup. Based on http://wiki.growstuff.org/index.php?title=Development_pre-requisites&oldid=817#Linux_and_OSX --- script/setup_growstuff.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 script/setup_growstuff.sh diff --git a/script/setup_growstuff.sh b/script/setup_growstuff.sh new file mode 100755 index 0000000..2c5cc9b --- /dev/null +++ b/script/setup_growstuff.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +if [ $# -lt 1 ]; then + echo "Usage: $0 [GitHub username]" + exit 2; +fi + +curl -L https://get.rvm.io | bash -s stable +. ~/.rvm/scripts/rvm # uses bashisms +rvm install 1.9.3-p194 +rvm use 1.9.3-p194 +rvm --default 1.9.3-p194 +# rvm docs generate # not sure we actually need this -MRG +git clone https://github.com/$1/growstuff.git +cd growstuff/ +git remote add upstream https://github.com/Growstuff/growstuff.git +rvm use 1.9.3-p194 +rvm gemset create growstuffdev +rvm gemset use growstuffdev +gem install bundler +git checkout dev +bundle install +rake db:create +rake db:migrate +rake db:seed +rake db:test:prepare +rake From 2bae17e515858b6b468402409594f3d0b0677328 Mon Sep 17 00:00:00 2001 From: Miles Gould Date: Mon, 24 Dec 2012 14:30:07 +0000 Subject: [PATCH 2/3] Vim modeline for setup_growstuff Sets indent to two spaces. --- script/setup_growstuff.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/setup_growstuff.sh b/script/setup_growstuff.sh index 2c5cc9b..4127652 100755 --- a/script/setup_growstuff.sh +++ b/script/setup_growstuff.sh @@ -1,4 +1,5 @@ #!/bin/bash +# vim: sw=2 if [ $# -lt 1 ]; then echo "Usage: $0 [GitHub username]" From 7ca6410165292a2a07074665777d0a53f2a1865f Mon Sep 17 00:00:00 2001 From: Miles Gould Date: Mon, 24 Dec 2012 23:38:50 +0000 Subject: [PATCH 3/3] If installation succeeds, tell the user what to do next. --- script/setup_growstuff.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/setup_growstuff.sh b/script/setup_growstuff.sh index 4127652..dd9ee1d 100755 --- a/script/setup_growstuff.sh +++ b/script/setup_growstuff.sh @@ -25,4 +25,4 @@ rake db:create rake db:migrate rake db:seed rake db:test:prepare -rake +rake && echo -e "Looks good! Now run\n\n. ~/.rvm/scripts/rvm\ncd growstuff\n"