diff options
author | mr <mr@mrautenberg.de> | 2011-05-23 13:32:45 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-05-23 13:32:45 +0200 |
commit | 0d550625e70e8e2149ef911d00d83098951ed4fc (patch) | |
tree | a65f1c14b32e36be889f5724be82bfb9c103d684 | |
parent | a82e9b42f518c2d0e5ac12237fd8a3cc2e5633d7 (diff) | |
parent | ccdba9f5223d82873b1c653ea3f8635f18fefd0e (diff) |
Merge branch 'release/2.0.0' into development
-rwxr-xr-x | install | 17 | ||||
-rw-r--r--[-rwxr-xr-x] | opentox-ruby.sh | 5 | ||||
-rwxr-xr-x | opentox-webservices.sh | 2 |
3 files changed, 16 insertions, 8 deletions
@@ -2,6 +2,11 @@ # Main Opentox-ruby install script # Author: Christoph Helma, Andreas Maunz +if [ "$(id -u)" = "0" ]; then + echo "This script must not be run as root" 1>&2 + exit 1 +fi + LOG="/tmp/`basename $0`-log.txt" . "./utils.sh" echo @@ -10,6 +15,9 @@ echo "You may need to give root password for some privileged actions right now a echo cmd="sudo echo -n \"\"" && run_cmd "$cmd" "Acquire privileges" +echo "Cleaning up /tmp files." +sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* /tmp/passenger* + . "./base-install.sh" . "./ruby.sh" . "./openbabel.sh" @@ -18,14 +26,11 @@ cmd="sudo echo -n \"\"" && run_cmd "$cmd" "Acquire privileges" if [ "$install" != "gem" ] then - . "./nginx.sh" - . "./redis.sh" - . "./opentox-webservices.sh" + . "./nginx.sh" + . "./redis.sh" + . "./opentox-webservices.sh" fi -echo "Cleaning up temp files." -sudo rm -rf /tmp/openbabel* /tmp/kernlab* /tmp/ruby* /tmp/passenger* - echo echo "Installation finished and system configured." echo "Destination: '$OT_PREFIX'" diff --git a/opentox-ruby.sh b/opentox-ruby.sh index 5fcff1c..5f8cc65 100755..100644 --- a/opentox-ruby.sh +++ b/opentox-ruby.sh @@ -67,10 +67,13 @@ fi mkdir -p "$HOME/.opentox/config" >>$LOG 2>&1 mkdir -p "$HOME/.opentox/log" >>$LOG 2>&1 +$GIT checkout production.yaml >>$LOG 2>&1 +$GIT checkout aa-$OT_INSTALL.yaml >>$LOG 2>&1 + cmd="sed -e \"s,SERVERNAME,$servername,;s,ESCAPEDSERVER,$escapedserver,;s,LOGGER,$logger,;s,AA,$aa,;s,WWW_DEST,$WWW_DEST,\" production.yaml > $HOME/.opentox/config/production.yaml" && run_cmd "$cmd" "Config 1" cmd="sed -e \"s,SERVERNAME,$servername,;s,ESCAPEDSERVER,$escapedserver,;s,LOGGER,$logger,;s,AA,$aa,;s,WWW_DEST,$WWW_DEST,\" aa-$OT_INSTALL.yaml >> $HOME/.opentox/config/production.yaml" && run_cmd "$cmd" "Config 1" -if [ "$OT_BRANCH" = "development" ]; then +if [ "$OT_BRANCH" = "development" ] || expr match "$OT_BRANCH" "release"; then mkdir -p $WWW_DEST/opentox >>$LOG 2>&1 cd $WWW_DEST/opentox >>$LOG 2>&1 rm -rf opentox-ruby >>$LOG 2>&1 diff --git a/opentox-webservices.sh b/opentox-webservices.sh index 23af311..91d402e 100755 --- a/opentox-webservices.sh +++ b/opentox-webservices.sh @@ -44,7 +44,7 @@ mkdir -p "$WWW_DEST/opentox" >>$LOG 2>&1 cd "$WWW_DEST/opentox" >>$LOG 2>&1 for s in compound dataset algorithm model toxcreate task validation; do rm -rf "$s" >>$LOG 2>&1 - $GIT clone "git://github.com/opentox/$s.git" "$s" >>$LOG 2>&1 + $GIT clone "git@github.com:opentox/$s.git" "$s" >>$LOG 2>&1 cd "$s" >>$LOG 2>&1 $GIT checkout -b $OT_BRANCH origin/$OT_BRANCH >>$LOG 2>&1 #rm -rf public >>$LOG 2>&1 |