summaryrefslogtreecommitdiff
path: root/opentox-ruby.sh
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-03-30 13:15:57 +0200
committerAndreas Maunz <andreas@maunz.de>2011-03-30 13:15:57 +0200
commit3175afdf422f54e11eadecb535a52ecc00119418 (patch)
tree411301b3e6401a908506d7d20b3b3c99014b9441 /opentox-ruby.sh
parent90c34fd3fbb337df8edc6318a746a520432d0a3a (diff)
opentox-ruby
Diffstat (limited to 'opentox-ruby.sh')
-rwxr-xr-xopentox-ruby.sh29
1 files changed, 22 insertions, 7 deletions
diff --git a/opentox-ruby.sh b/opentox-ruby.sh
index c3efcb2..ae8e08e 100755
--- a/opentox-ruby.sh
+++ b/opentox-ruby.sh
@@ -16,6 +16,19 @@ if [ ! -e "$GIT" ]; then
exit 1
fi
+GEM="`which gem`"
+if [ ! -e "$GEM" ]; then
+ echo "'gem' missing. Install 'gem' first. Aborting..."
+ exit 1
+fi
+
+RAKE="`which rake`"
+if [ ! -e "$RAKE" ]; then
+ echo "'rake' missing. Install 'rake' first. Aborting..."
+ exit 1
+fi
+
+
# Pkg
source ./config.sh
@@ -26,8 +39,8 @@ read
DIR="`pwd`"
-gem install opentox-ruby
-gem install builder # not included by spreadsheet gem
+$GEM install opentox-ruby
+$GEM install builder # not included by spreadsheet gem
SERVERNAME="`hostname`"
ESCAPED_SERVERNAME="`echo $SERVERNAME | sed 's/\/\\\//'`"
@@ -44,12 +57,14 @@ if [ $branch = "development" ]
then
mkdir -p $WWW_DEST/opentox
cd $WWW_DEST/opentox
- $GIT clone http://github.com/opentox/opentox-ruby.git
+ $GIT clone "http://github.com/opentox/opentox-ruby.git "
cd opentox-ruby
- $GIT checkout -t origin/development
- gem install jeweler
- rake install
- GEM_LIB=`gem which opentox-ruby | sed 's/\/opentox-ruby.rb//'`
+ $GIT checkout -t "origin/development"
+ $GEM install jeweler
+ $RAKE install
+ GEM_LIB=`$GEM which opentox-ruby | sed 's/\/opentox-ruby.rb//'`
mv "$GEM_LIB" "$GEM_LIB~"
ln -s "$WWW_DEST/opentox/opentox-ruby/lib" "$GEM_LIB"
fi
+
+cd "$DIR"