diff options
-rw-r--r-- | config.sh | 2 | ||||
-rwxr-xr-x | kernlab.sh | 2 | ||||
-rwxr-xr-x | nginx.sh | 37 |
3 files changed, 33 insertions, 8 deletions
@@ -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" @@ -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 @@ -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." |