summaryrefslogtreecommitdiff
path: root/opentox-webservices.sh
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-03-31 10:54:31 +0200
committerAndreas Maunz <andreas@maunz.de>2011-03-31 10:54:31 +0200
commit811111e8120218b5751e06b5ee31cef112ada3b5 (patch)
tree389a4199e91501a14805d6b66dbf0a089b9bd9a1 /opentox-webservices.sh
parent409c38da02f6ad65aa41fedf8e8e28a8922e97d7 (diff)
opentox-webservices.sh
Diffstat (limited to 'opentox-webservices.sh')
-rwxr-xr-xopentox-webservices.sh40
1 files changed, 32 insertions, 8 deletions
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 <Return> to continue, or <Ctrl+C> 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