diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-03-29 12:24:28 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-03-29 12:24:28 +0200 |
commit | 6ba25c9cc51c285fdd1443057f61213668bb4a1b (patch) | |
tree | e1f42ccc96b0d7d58e23d546b9362bfb7849a600 /openbabel.sh | |
parent | e53c4f70598e403ba38c27a4637d540a10ee2075 (diff) |
Kernlab fix: Missing command
Diffstat (limited to 'openbabel.sh')
-rwxr-xr-x | openbabel.sh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/openbabel.sh b/openbabel.sh index 37b92dc..f132fd5 100755 --- a/openbabel.sh +++ b/openbabel.sh @@ -30,24 +30,26 @@ PREFIX_BINDINGS="$HOME/openbabel-ruby-install" OB_CONF=$HOME/.bash_OB_ot RUBY_CONF=$HOME/.bash_ruby_ot + +echo "This installs Openbabel." +echo "Your installation directory is '$PREFIX'." +echo "A configuration file is created and you are given the option to have it included in your '~.bashrc'." +echo "Press <Return> to continue, or <Ctrl+C> to abort." +read + +DIR="`pwd`" + mkdir "$PREFIX" >/dev/null 2>&1 if [ ! -d "$PREFIX" ]; then echo "Install directory '$PREFIX' is not available! Aborting..." exit 1 else if ! rmdir "$PREFIX" >/dev/null 2>&1; then # if not empty this will fail - echo "Install directory '$PREFIX' is not empty. Skipping Openbabel installation..." + echo "Install directory '$PREFIX' is not empty. Skipping openbabel base installation..." OB_DONE=true fi fi - -DIR="`pwd`" if [ ! $OB_DONE ]; then - echo "This installs Openbabel." - echo "Your installation directory is '$PREFIX'." - echo "A configuration file is created and you are given the option to have it included in your '~.bashrc'." - echo "Press <Return> to continue, or <Ctrl+C> to abort." - read cd /tmp if ! $WGET -O - "http://downloads.sourceforge.net/project/openbabel/openbabel/$VER/$OBVER.tar.gz?use_mirror=kent" | tar zxv >/dev/null 2>&1; then echo "Download failed! Aborting..." @@ -66,7 +68,6 @@ echo "Press <Return> to continue, or <Ctrl+C> to abort." echo -n "Enter 's' to skip this step: " read RBB_SKIP if [ "$RBB_SKIP" != "s" ]; then - OB_DONE=false mkdir "$PREFIX_BINDINGS">/dev/null 2>&1 if [ ! -d "$PREFIX_BINDINGS" ]; then @@ -78,7 +79,6 @@ if [ "$RBB_SKIP" != "s" ]; then OB_DONE=true fi fi - if ! $OB_DONE ; then cd "/tmp/$OBVER/scripts/ruby/" ruby extconf.rb --with-openbabel-include="$PREFIX/include/openbabel-2.0" @@ -91,6 +91,7 @@ if [ "$RBB_SKIP" != "s" ]; then fi fi fi + cd "$DIR" echo |