From 811111e8120218b5751e06b5ee31cef112ada3b5 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 31 Mar 2011 10:54:31 +0200 Subject: opentox-webservices.sh --- opentox-webservices.sh | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'opentox-webservices.sh') diff --git a/opentox-webservices.sh b/opentox-webservices.sh index 6f82096..d70bffe 100755 --- a/opentox-webservices.sh +++ b/opentox-webservices.sh @@ -21,20 +21,32 @@ source ./utils.sh LOG="/tmp/`basename $0`-log.txt" echo "This installs Opentox webservices." +echo "Log file is '$LOG'." echo "Press to continue, or to abort." read DIR=`pwd` +echo "Checking out webservices..." mkdir -p "$WWW_DEST/opentox" >>$LOG 2>&1 -cd "$WWW_DEST/opentox" +cd "$WWW_DEST/opentox" >>$LOG 2>&1 for s in compound dataset algorithm model toxcreate task; do - git clone "git://github.com/opentox/$s.git" "$s" - cd "$s" - git checkout -t origin/development # AM: use development - mkdir public - ln -s "$WWW_DEST/opentox/$s/public" "$WWW_DEST/$s" - cd - + git clone "git://github.com/opentox/$s.git" "$s" >>$LOG 2>&1 + + cd "$s" >>$LOG 2>&1 + + git checkout -t origin/development >>$LOG 2>&1 +# AM: use development + mkdir public >>$LOG 2>&1 + + if ln -s "$WWW_DEST/opentox/$s/public" "$WWW_DEST/$s" >>$LOG 2>&1; then + printf "%25s%15s\n" "'Linking $s'" "FAIL" + exit 1 + fi + printf "%25s%15s\n" "'Linking $s'" "DONE" + + cd - >>$LOG 2>&1 + done # validation service @@ -46,10 +58,22 @@ done #ln -s /var/www/opentox/validation/public /var/www/validation # fminer etc +echo "Compiling Fminer..." + +if ! [ -f $HOME/.opentox/production.yaml ]; then + printf "%25s%15s\n" "'Config present'" "N" + exit 1 +fi +printf "%25s%15s\n" "'Config present'" "Y" + cd $WWW_DEST/opentox/algorithm >>$LOG 2>&1 echo "Need root password:" sudo updatedb >>$LOG 2>&1 -rake fminer:install >>$LOG 2>&1 +if ! rake fminer:install >>$LOG 2>&1; then + printf "%25s%15s\n" "'Make'" "FAIL" + exit 1 +fi +printf "%25s%15s\n" "'Make'" "FAIL" cd "$DIR" echo -- cgit v1.2.3