diff options
author | Andreas Maunz <andreas@maunz.de> | 2012-08-21 11:57:28 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2012-08-21 11:57:28 +0200 |
commit | c568c54d9f5c444812e4050c1b7411648a416286 (patch) | |
tree | c72d93f86bc834c283df4c72df5e76d26cc90dfb | |
parent | 2728dccd88af84afd62df090a8bdd06be1a4d8a3 (diff) |
Bugfixes
-rwxr-xr-x | config.sh | 4 | ||||
-rwxr-xr-x | install | 15 | ||||
-rwxr-xr-x | utils.sh | 11 |
3 files changed, 16 insertions, 14 deletions
@@ -18,7 +18,7 @@ OT_JAVA_HOME="/usr/lib/jvm/java-6-openjdk" OB_NUM_VER="2.3.1" RAPTOR2_NUM_VER="2.0.8" RASQAL_NUM_VER="0.9.29" -RUBY_DWL="http://ftp.ruby-lang.org/pub/ruby/1.9" +RUBY_NUM_VER="1.9.3-p194" # Done. @@ -42,4 +42,6 @@ OB_DEST_BINDINGS="$OT_PREFIX/openbabel-ruby-install" RAPTOR2_DWL="http://download.librdf.org/source/$RAPTOR2_VER.tar.gz" RASQAL_DWL="http://download.librdf.org/source/$RASQAL_VER.tar.gz" +RUBY_DWL="http://ftp.ruby-lang.org/pub/ruby/1.9" +RUBY_DIR="$HOME/.rbenv/versions/$RUBY_NUM_VER" @@ -26,7 +26,7 @@ echo "Backup finished." . ./utils.sh -LOG="$OT_PREFIX/tmp/`basename $0`.log" +check_log `basename $0` echo echo "Welcome to base installation for OpenTox compatible services on Ruby and Debian." echo "IMPORTANT: Hit <Ctrl+C> to adjust config.sh first (<Return> to continue)." @@ -41,10 +41,10 @@ echo [ -f $OT_DEFAULT_CONF ] || (cmd="echo '\$aa = { :uri => nil }' > $OT_DEFAULT_CONF" && run_cmd "$cmd" "Install default.rb to CONFIG (~/.opentox/config)") -. ./base-install # Debian specific; disable this for others. -./raptor2-install # Download, compile and build raptor2. Install to OT_PREFIX. -./rasqal-install # Download, compile and build rasqal. Install to OT_PREFIX. -./4store-install # Download, compile and build 4store. Install to OT_PREFIX. +#. ./base-install # Debian specific; disable this for others. +#./raptor2-install # Download, compile and build raptor2. Install to OT_PREFIX. +#./rasqal-install # Download, compile and build rasqal. Install to OT_PREFIX. +#./4store-install # Download, compile and build 4store. Install to OT_PREFIX. check_utils "git" if [ ! -d ~/.rbenv ]; then @@ -63,11 +63,8 @@ fi # Install global ruby version -. $OT_UI_CONF +. "$OT_UI_CONF" check_utils "rbenv" -SELF=$(basename $0) -check_log $SELF -export RUBY_NUM_VER="1.9.3-p194" [ "`$RBENV global 2>/dev/null`" = "$RUBY_NUM_VER" ] || (install_ruby global) notify @@ -61,8 +61,11 @@ run_cmd () # } check_utils() { for u in $1; do - (uPath=`which $u`) || (echo "'$u' missing. Install '$u' first." 1>&2 && exit 1) - eval `echo $u | tr "[:lower:]" "[:upper:]" | tr "-" "_"`="$uPath" + UPATH=`which $u` + if [ "$?" -eq 1 ]; then + echo "'$u' missing. Install '$u' first." 1>&2 && exit 1 + fi + eval `echo $u | tr "[:lower:]" "[:upper:]" | tr "-" "_"`=$UPATH done } @@ -130,10 +133,10 @@ install_ot_service(){ # emit notification if caller was the shell (the user), see http://goo.gl/grCOk notify() { echo - echo "Installation succesful" + echo "Installation finished (check above for errors)" echo if ps -o stat= -p $PPID | grep "s" >/dev/null 2>&1; then - echo "IMPORTANT: How to configure your system:" + echo "IMPORTANT: How to configure your system if everything went fine:" echo "IMPORTANT: a) Include '$OT_UI_CONF' in shell startup (e.g. ~/.bashrc)." echo "IMPORTANT: b) Manually source '$OT_UI_CONF' every time." echo "IMPORTANT: The command in both cases: '. $OT_UI_CONF'" |