summaryrefslogtreecommitdiff
path: root/openbabel.sh
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-03-31 13:56:31 +0200
committerAndreas Maunz <andreas@maunz.de>2011-03-31 13:56:31 +0200
commit6bcb46de198aff22039eeb40f2a4392421c823d8 (patch)
tree559e6b4b3e46021000a0d928edd6b40c2de1a829 /openbabel.sh
parentac2854eb48294aa36f096a8cd6b3a6769c6bec00 (diff)
all
Diffstat (limited to 'openbabel.sh')
-rwxr-xr-xopenbabel.sh50
1 files changed, 8 insertions, 42 deletions
diff --git a/openbabel.sh b/openbabel.sh
index bd607c6..5b16a1b 100755
--- a/openbabel.sh
+++ b/openbabel.sh
@@ -44,30 +44,13 @@ echo "Install:"
if [ ! $OB_DONE ]; then
cd /tmp
URI="http://downloads.sourceforge.net/project/openbabel/openbabel/$OB_NUM_VER/$OB_VER.tar.gz?use_mirror=kent"
- if ! $WGET -O - "$URI" 2>>$LOG | tar zxv >>$LOG 2>&1; then
- printf "%25s%15s\n" "'Download'" "FAIL"
- exit 1
- fi
- printf "%25s%15s\n" "'Download'" "DONE"
+ cmd="$WGET $URI" && run_cmd "$cmd" "Download"
+ cmd="tar zxf $OB_VER.tar.gz" && run_cmd "$cmd" "Unpack"
cd "/tmp/$OB_VER"
- if ! ./configure --prefix="$OB_DEST" >>$LOG 2>&1; then
- printf "%25s%15s\n" "'Configure'" "FAIL"
- exit 1
- fi
- printf "%25s%15s\n" "'Configure'" "DONE"
-
- if ! make >>$LOG 2>&1; then
- printf "%25s%15s\n" "'Make'" "FAIL"
- exit 1
- fi
- printf "%25s%15s\n" "'Make'" "DONE"
-
- if ! make install >>$LOG 2>&1; then
- printf "%25s%15s\n" "'Install'" "FAIL"
- exit 1
- fi
- printf "%25s%15s\n" "'Install'" "DONE"
+ cmd="./configure --prefix=$OB_DEST" && run_cmd "$cmd" "Configure"
+ cmd="make" && run_cmd "$cmd" "Make"
+ cmd="make install" && run_cmd "$cmd" "Install"
fi
echo
@@ -86,28 +69,11 @@ fi
if ! $OB_DONE ; then
cd "/tmp/$OB_VER/scripts/ruby/"
-
- if ! ruby extconf.rb --with-openbabel-include="$OB_DEST/include/openbabel-2.0" >>$LOG 2>&1; then
- printf "%25s%15s\n" "'Bindings: Code'" "FAIL"
- exit 1
- fi
- printf "%25s%15s\n" "'Bindings: Code'" "DONE"
-
- if ! make >>$LOG 2>&1; then
- printf "%25s%15s\n" "'Bindings: Make'" "FAIL"
- exit 1
- fi
- printf "%25s%15s\n" "'Bindings: Make'" "DONE"
-
- if ! cp openbabel.so $OB_DEST_BINDINGS >>$LOG 2>&1; then
- printf "%25s%15s\n" "'Bindings: Install'" "FAIL"
- exit 1
- fi
- printf "%25s%15s\n" "'Bindings: Install'" "DONE"
-
+ cmd="ruby extconf.rb --with-openbabel-include=$OB_DEST/include/openbabel-2.0" && run_cmd "$cmd" "Bindings: Code"
+ cmd="make" && run_cmd "$cmd" "Make"
+ cmd="cp openbabel.so $OB_DEST_BINDINGS" && run_cmd "$cmd" "Bindings: Install"
fi
-
cd "$DIR"
echo