summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-07-12 10:56:24 +0200
committerAndreas Maunz <andreas@maunz.de>2011-07-12 10:56:24 +0200
commitb7e23a6915e2650a2394911500df59fcc09a91a2 (patch)
treeff112f9b365db55f062b8db07432a125e853b525
parent68db5209c29f0838e2a72965aa8580bef72ed56d (diff)
parentfd3edb3948052f0cd3bd888719aa83a7fb9ca794 (diff)
Merge branch 'development' of git://github.com/opentox/install into development
-rw-r--r--README13
-rwxr-xr-xopentox-webservices.sh10
2 files changed, 17 insertions, 6 deletions
diff --git a/README b/README
index 781a37c..8d86513 100644
--- a/README
+++ b/README
@@ -33,6 +33,7 @@ otconfig() {
# Update the development version
otupdate() {
+ START_DIR=`PWD`
otconfig
cd $HOME/opentox-ruby/www/opentox
for d in `find -not -name "." -type d -maxdepth 1 2>/dev/null`; do echo $d ; cd $d ; git pull ; echo ; cd - ; done
@@ -41,7 +42,7 @@ otupdate() {
mv liblast/Makefile liblast/Makefile~
if ! git pull; then
echo "Error! Pull for Fminer failed."
- exit 1
+ return 1
fi
mv libbbrc/Makefile~ libbbrc/Makefile
mv liblast/Makefile~ liblast/Makefile
@@ -53,12 +54,15 @@ otupdate() {
cd $HOME/opentox-ruby/www/opentox/algorithm/last-utils
if ! git pull; then
echo "Error! Pull for Last-Utils failed."
- exit 1
+ return 1
fi
cd -
cd opentox-ruby
- rake install
LINK_DIR=`gem which opentox-ruby | sed 's/\/opentox-ruby.rb//'`
+ if [ -h $LINK_DIR ]; then
+ rm -f $LINK_DIR
+ fi
+ rake install
if ! [ -h $LINK_DIR ]; then
echo "Warning! Your lib $LINK_DIR is no symlink. Linking back for you..."
rm -rf "$LINK_DIR~"
@@ -66,6 +70,7 @@ otupdate() {
ln -sf $HOME/opentox-ruby/www/opentox/opentox-ruby/lib `echo ${LINK_DIR::${#LINK_DIR}-4}`
fi
echo "Please execute 'otstart' to restart."
+ cd "START_DIR"
}
@@ -94,6 +99,6 @@ otreload() {
otkill() {
sudo killall nginx >/dev/null 2>&1
sudo bash -c "source $HOME/.opentox-ui.sh; redis-cli shutdown >/dev/null 2>&1"
- while ps ax | grep PassengerHelperAgent | grep -v grep >/dev/null 2>&1; do sleep 1; done
+ while ps ax | grep PassengerWatchdog | grep -v grep >/dev/null 2>&1; do sleep 1; done
for p in `pgrep R 2>/dev/null`; do sudo kill -9 $p; done
}
diff --git a/opentox-webservices.sh b/opentox-webservices.sh
index 811d4bc..ef98ded 100755
--- a/opentox-webservices.sh
+++ b/opentox-webservices.sh
@@ -31,6 +31,12 @@ if [ ! -e "$GIT" ]; then
exit 1
fi
+RUBY="`which ruby`"
+if [ ! -e "$RUBY" ]; then
+ echo "'ruby' missing. Install 'ruby' first. Aborting..."
+ exit 1
+fi
+
LOG="/tmp/`basename $0`-log.txt"
echo
@@ -74,10 +80,10 @@ for mylib in bbrc last; do
done
cd "libfminer/libbbrc">>$LOG 2>&1
cmd="make ruby" && run_cmd "$cmd" "Make BBRC"
-cd ->>$LOG 2>&1
+cd -
cd "libfminer/liblast">>$LOG 2>&1
cmd="make ruby" && run_cmd "$cmd" "Make LAST"
-cd ->>$LOG 2>&1
+cd -
cd "last-utils">>$LOG 2>&1
$GIT checkout $OT_BRANCH>>$LOG 2>&1
$GIT pull >>$LOG 2>&1