From c568c54d9f5c444812e4050c1b7411648a416286 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 21 Aug 2012 11:57:28 +0200 Subject: Bugfixes --- config.sh | 4 +++- install | 15 ++++++--------- utils.sh | 11 +++++++---- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/config.sh b/config.sh index d844d55..dbc42e6 100755 --- a/config.sh +++ b/config.sh @@ -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" diff --git a/install b/install index 544c6c7..48b39fa 100755 --- a/install +++ b/install @@ -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 to adjust config.sh first ( 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 diff --git a/utils.sh b/utils.sh index caa96ef..e06be5d 100755 --- a/utils.sh +++ b/utils.sh @@ -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'" -- cgit v1.2.3