summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2012-08-03 18:11:26 +0200
committerdavor <vorgrimmlerdavid@gmx.de>2012-08-03 18:11:26 +0200
commit3a6e2cdcf50d40d2eee12c3dc36e8890bd9712a8 (patch)
tree4745ad6278445ee8e61062638ef6952c182e9ddf
parent1393f5f75b4afb50986a6d79fc2657be965ae1d7 (diff)
Modified/renamed scripts.
-rwxr-xr-x4store-install2
-rwxr-xr-xinstall1
-rwxr-xr-xraptor_rasqal-install33
-rw-r--r--raptor_rasqal.sh17
-rwxr-xr-xservices-install42
-rw-r--r--services.sh10
-rwxr-xr-xutils.sh5
7 files changed, 81 insertions, 29 deletions
diff --git a/4store-install b/4store-install
index 3a75faa..66b1b95 100755
--- a/4store-install
+++ b/4store-install
@@ -30,6 +30,8 @@ if ! grep "$FST_CONF" $OT_UI_CONF >/dev/null 2>&1; then
echo '. '$FST_CONF >> $OT_UI_CONF
fi
+mkdir -p $FST/log
+
# Testing code --- unused
#export LD_LIBRARY_PATH=$FST/lib
#cd $FST
diff --git a/install b/install
index 0a3a1e7..504ae49 100755
--- a/install
+++ b/install
@@ -40,6 +40,7 @@ echo
[ -f $HOME/.opentox/config/install/config.sh ] || (cmd="mkdir -p $HOME/.opentox/config/install && cp config.sh $HOME/.opentox/config/install" && run_cmd "$cmd" "Install config.sh to CONFIG (~/.opentox)")
. ./base-install # Debian specific; disable this for others.
+./raptor_rasqal.sh
./4store-install # Download, compile and build 4store. Install to OT_PREFIX.
if [ ! -d ~/.rbenv ]; then
diff --git a/raptor_rasqal-install b/raptor_rasqal-install
new file mode 100755
index 0000000..66a9959
--- /dev/null
+++ b/raptor_rasqal-install
@@ -0,0 +1,33 @@
+#!/bin/sh
+DIR=`pwd`
+
+# Boot
+. ./utils.sh || (echo "Utils could not be loaded, check opentox-ui.sh." 1>&2 && exit 1)
+SELF=$(basename $0 -install)
+check_log $SELF
+#[ "`id -u`" = "0" ] && echo "This script must not be run as root" 1>&2 && exit 1
+check_utils "wget tar make"
+
+mkdir -p $PREFIX/tmp
+cd $OT_PREFIX/tmp/
+$WGET http://download.librdf.org/source/raptor2-2.0.8.tar.gz
+$TAR xvzf raptor2-2.0.8.tar.gz
+rm raptor2-2.0.8.tar.gz
+cd raptor2-2.0.8
+./configure
+$MAKE
+sudo $MAKE install
+sudo /sbin/ldconfig
+cd ..
+
+$WGET http://download.librdf.org/source/rasqal-0.9.29.tar.gz
+$TAR xvzf tmp/rasqal-0.9.29.tar.gz
+rm rasqal-0.9.29.tar.gz
+cd rasqal-0.9.29
+./configure
+$MAKE
+sudo $MAKE install
+sudo /sbin/ldconfig
+
+cd $DIR
+
diff --git a/raptor_rasqal.sh b/raptor_rasqal.sh
deleted file mode 100644
index 0eee5f9..0000000
--- a/raptor_rasqal.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-wget http://download.librdf.org/source/raptor2-2.0.8.tar.gz
-tar xvzf raptor2-2.0.8.tar.gz
-cd raptor2-2.0.8
-./configure
-make
-sudo make install
-sudo /sbin/ldconfig
-cd
-
-wget http://download.librdf.org/source/rasqal-0.9.29.tar.gz
-tar xvzf rasqal-0.9.29.tar.gz
-cd rasqal-0.9.29
-./configure
-make
-sudo make install
-sudo /sbin/ldconfig
-cd
diff --git a/services-install b/services-install
new file mode 100755
index 0000000..9165b9e
--- /dev/null
+++ b/services-install
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+SELF=$(basename $0 -install)
+[ "`id -u`" = "0" ] && echo "This script must be run as non-root." 1>&2 && exit 1
+
+# Adjust ruby version here!
+RUBY_NUM_VER="1.9.3-p194"
+
+echo
+echo "Welcome to service installation (<Return> to continue)."
+read delete_me
+
+
+# check wd is root of service
+DIR=`pwd`
+if echo $DIR | grep "$SELF/bin" >/dev/null 2>&1 ; then cd ..; fi
+
+# # # Boot the script
+
+# load base config, helper funs, environment
+OT_CONFIG_DIR="$HOME/.opentox"
+! [ -f "$OT_CONFIG_DIR/config/install/config.sh" ] && echo "config.sh not found." 1>&2 && exit 1 || . $OT_CONFIG_DIR/config/install/config.sh
+! [ -f "$OT_PREFIX/install/utils.sh" ] && echo "utils.sh not found." 1>&2 && exit 1 || . $OT_PREFIX/install/utils.sh
+[ -f $OT_CONFIG_DIR/opentox-ui.sh ] && . $OT_CONFIG_DIR/opentox-ui.sh # should have been done by user already
+RUBY_DIR="$HOME/.rbenv/versions/$RUBY_NUM_VER"
+
+
+# # # Install
+
+LOG="$OT_PREFIX/tmp/services.log"
+check_utils "rbenv find"
+echo
+echo "Installation ('$LOG'):"
+echo
+
+[ "`$RBENV local 2>/dev/null`" = "$RUBY_NUM_VER" ] || install_ruby
+
+
+for SERVICE in opentox-client opentox-server dataset algorithm; do
+ install_ot_service
+done
+cd $DIR
diff --git a/services.sh b/services.sh
deleted file mode 100644
index c5bbeb6..0000000
--- a/services.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-source config.sh
-source utils.sh
-LOG="$OT_PREFIX/tmp/service_install.log"
-DIR=`pwd`
-for SERVICE in opentox-client opentox-server dataset algorithm; do
- install_ot_service
-done
-cd $DIR
diff --git a/utils.sh b/utils.sh
index 8ff9f6d..130525e 100755
--- a/utils.sh
+++ b/utils.sh
@@ -98,7 +98,7 @@ ot_git_download(){
printf "\n%50s\n" "GIT DOWNLOAD"
check_utils "git"
cd $OT_PREFIX
- cmd="git clone git@github.com:opentox/$SERVICE.git" && run_cmd "$cmd" "Downloading $SERVICE git repository"
+ cmd="$GIT clone git@github.com:opentox/$SERVICE.git" && run_cmd "$cmd" "Downloading $SERVICE git repository"
}
# install opentox service
@@ -108,7 +108,8 @@ install_ot_service(){
cd $OT_PREFIX
ot_git_download
cd $SERVICE
- git checkout $OT_BRANCH
+ $GIT checkout $OT_BRANCH >>$LOG 2>&1
+ $RBENV local $RUBY_NUM_VER
case "$SERVICE" in
opentox-server) install_with_bundler;;
opentox-client) install_with_bundler;;