summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.sh2
-rwxr-xr-xkernlab.sh2
-rwxr-xr-xnginx.sh37
3 files changed, 33 insertions, 8 deletions
diff --git a/config.sh b/config.sh
index 8eb5aff..fad153b 100644
--- a/config.sh
+++ b/config.sh
@@ -3,7 +3,7 @@ JAVA_CONF=$HOME/.bash_java_ot
RUBY_VER="ruby-enterprise-1.8.7-2011.03"
RUBY_CONF=$HOME/.bash_ruby_ot
-RUBY_DEST="$HOME/$RUB_YVER"
+RUBY_DEST="$HOME/$RUBY_VER"
OB_NUM_VER="2.2.3"
OB_VER="openbabel-$OB_NUM_VER"
diff --git a/kernlab.sh b/kernlab.sh
index 8da3ec6..91f6cb5 100755
--- a/kernlab.sh
+++ b/kernlab.sh
@@ -49,7 +49,7 @@ else
fi
fi
if ! $R_DONE; then
-cd /tmp
+ cd /tmp
if ! $WGET -O - "http://cran.r-project.org/src/contrib/Archive/kernlab/kernlab_$KL_VER.tar.gz">/dev/null 2>&1; then
echo "Download failed! Aborting..."
exit 1
diff --git a/nginx.sh b/nginx.sh
index 43a4a3e..e528d8b 100755
--- a/nginx.sh
+++ b/nginx.sh
@@ -17,10 +17,35 @@ if [ ! -e "$PIN" ]; then
fi
source ./config.sh
-$PIN --auto-download --auto --prefix="$NGINX_DEST"
-cd $RUBY_DEST/lib/ruby/gems/1.8/gems/
-passenger=`ls -d passenger*`;
-cd -
-servername=`hostname`.`dnsdomainname`
-sed -e "s/PASSENGER/$passenger/;s/SERVERNAME/$servername/" ./nginx.conf > $NGINX_DEST/nginx.conf
+
+echo "This installs Nginx."
+echo "Press <Return> to continue, or <Ctrl+C> to abort."
+read
+
+DIR="`pwd`"
+
+NGINX_DONE=false
+mkdir "$NGINX_DEST" >/dev/null 2>&1
+if [ ! -d "$NGINX_DEST" ]; then
+ echo "Install directory '$KL_DEST' is not available! Aborting..."
+ exit 1
+else
+ if ! rmdir "$KL_DEST" >/dev/null 2>&1; then # if not empty this will fail
+ echo "Install directory '$KL_DEST' is not empty. Skipping kernlab installation..."
+ NGINX_DONE=true
+ fi
+fi
+
+if ! $NGINX_DONE; then
+ $PIN --auto-download --auto --prefix="$NGINX_DEST"
+ cd "$RUBY_DEST/lib/ruby/gems/1.8/gems/"
+ passenger=`ls -d passenger*`;
+ cd -
+ servername=`hostname`.`dnsdomainname`
+ sed -e "s/PASSENGER/$passenger/;s/SERVERNAME/$servername/" ./nginx.conf > $NGINX_DEST/nginx.conf
+fi
+
+cd "$DIR"
+echo
+echo "Nginx installation finished."