Browse Source

Error handling for installation

Hamilton Turner 11 năm trước cách đây
mục cha
commit
77bf122c76
47 tập tin đã thay đổi với 102 bổ sung129 xóa
  1. 52 11
      toolset/setup/linux/bash_functions.sh
  2. 1 2
      toolset/setup/linux/frameworks/grails.sh
  3. 1 2
      toolset/setup/linux/frameworks/jester.sh
  4. 1 2
      toolset/setup/linux/frameworks/nawak.sh
  5. 1 2
      toolset/setup/linux/frameworks/onion.sh
  6. 1 2
      toolset/setup/linux/frameworks/play1.sh
  7. 1 2
      toolset/setup/linux/frameworks/play2.sh
  8. 1 3
      toolset/setup/linux/frameworks/siena.sh
  9. 0 3
      toolset/setup/linux/frameworks/treefrog.sh
  10. 1 2
      toolset/setup/linux/frameworks/vertx.sh
  11. 1 2
      toolset/setup/linux/frameworks/wt.sh
  12. 0 1
      toolset/setup/linux/frameworks/yesod.sh
  13. 4 17
      toolset/setup/linux/installer.py
  14. 1 2
      toolset/setup/linux/languages/composer.sh
  15. 1 2
      toolset/setup/linux/languages/dart.sh
  16. 1 2
      toolset/setup/linux/languages/elixir.sh
  17. 1 2
      toolset/setup/linux/languages/erlang.sh
  18. 1 2
      toolset/setup/linux/languages/go.sh
  19. 1 2
      toolset/setup/linux/languages/haskell.sh
  20. 1 2
      toolset/setup/linux/languages/hhvm.sh
  21. 0 1
      toolset/setup/linux/languages/java.sh
  22. 1 2
      toolset/setup/linux/languages/jruby.sh
  23. 1 3
      toolset/setup/linux/languages/mono.sh
  24. 2 3
      toolset/setup/linux/languages/nimrod.sh
  25. 2 3
      toolset/setup/linux/languages/nodejs.sh
  26. 1 2
      toolset/setup/linux/languages/perl.sh
  27. 1 2
      toolset/setup/linux/languages/phalcon.sh
  28. 4 5
      toolset/setup/linux/languages/php.sh
  29. 1 2
      toolset/setup/linux/languages/pypy.sh
  30. 1 2
      toolset/setup/linux/languages/python2.sh
  31. 1 2
      toolset/setup/linux/languages/python3.sh
  32. 0 2
      toolset/setup/linux/languages/racket.sh
  33. 1 2
      toolset/setup/linux/languages/ringojs.sh
  34. 1 2
      toolset/setup/linux/languages/ruby.sh
  35. 1 2
      toolset/setup/linux/languages/urweb.sh
  36. 1 2
      toolset/setup/linux/languages/xsp.sh
  37. 1 3
      toolset/setup/linux/languages/yaf.sh
  38. 1 6
      toolset/setup/linux/prerequisites.sh
  39. 1 2
      toolset/setup/linux/systools/leiningen.sh
  40. 1 2
      toolset/setup/linux/systools/maven.sh
  41. 1 2
      toolset/setup/linux/webservers/lapis.sh
  42. 1 2
      toolset/setup/linux/webservers/mongrel2.sh
  43. 1 2
      toolset/setup/linux/webservers/nginx.sh
  44. 1 2
      toolset/setup/linux/webservers/openresty.sh
  45. 1 2
      toolset/setup/linux/webservers/resin.sh
  46. 1 2
      toolset/setup/linux/webservers/weber.sh
  47. 1 2
      toolset/setup/linux/webservers/zeromq.sh

+ 52 - 11
toolset/setup/linux/bash_functions.sh

@@ -20,30 +20,71 @@ fw_unzip() {
   unzip "$@"
 }
 
+# Was there an error for the current dependency?
+FW_dep_error=0
+# Have we seen any errors?
+FW_any_errors=0
+fw_traperror () {
+  depend=$1
+  err=$2 # error status
+  line=$3 # LINENO
+  command="$4"
+  FW_dep_error=1
+  FW_any_errors=1
+
+  echo "ERROR: ${depend}.sh at line $line - command '$command' exited with status: $err"
+}
+
 # Requires dependencies to come in order e.g. Nimrod before
 # Jester, etc. Users should be know this 
 # fairly well (e.g. you can't use Yaf without PHP)
 fw_depends() {
+
+  # Turn on errtrace (-E), so that our ERR
+  # trap is passed on to any subshells
+  set -E
+
   for depend in "$@"
   do
+    depend=$(echo $depend | awk '{print tolower($0)}')
     echo Searching for $depend
+    trap 'fw_traperror $depend $? $LINENO "$BASH_COMMAND"'  ERR
+    retcode=0
     if [ -f ../toolset/setup/linux/systools/${depend}.sh ]; then
       echo Installing system tool: $depend 
-      bash ../toolset/setup/linux/systools/${depend}.sh
-    fi
-    if [ -f ../toolset/setup/linux/languages/${depend}.sh ]; then
+      . ../toolset/setup/linux/systools/${depend}.sh
+    elif [ -f ../toolset/setup/linux/languages/${depend}.sh ]; then
       echo Installing language: $depend 
-      bash ../toolset/setup/linux/languages/${depend}.sh
-    fi
-    if [ -f ../toolset/setup/linux/webservers/${depend}.sh ]; then
+      . ../toolset/setup/linux/languages/${depend}.sh
+    elif [ -f ../toolset/setup/linux/webservers/${depend}.sh ]; then
       echo Installing webserver: $depend 
-      bash ../toolset/setup/linux/webservers/${depend}.sh
-    fi
-    if [ -f ../toolset/setup/linux/frameworks/${depend}.sh ]; then
+      . ../toolset/setup/linux/webservers/${depend}.sh
+    elif [ -f ../toolset/setup/linux/frameworks/${depend}.sh ]; then
       echo Installing framework: $depend
-      bash ../toolset/setup/linux/frameworks/${depend}.sh
+      . ../toolset/setup/linux/frameworks/${depend}.sh
+    else
+      echo WARN: No installer found for $depend
+      continue
+    fi
+
+    # For a sourced script to pass, all internal commands must return
+    # non-zero. If you want to intentionally cause a failed install
+    # message, just return a non-zero status from the sourced script
+    if [ $FW_dep_error -ne 0 ]; then
+      echo ERROR: $depend may not be installed properly
+
+      # Reset variable for the next dependencies
+      FW_dep_error=0
+    else
+      echo $depend is installed!
     fi
-  done  
+  done
+
+  # Politely clean up our trap and trace
+  set +E
+  trap - ERR
+
+  return $FW_any_errors
 }
 
 # Exits 0 if file or directory exists

+ 1 - 2
toolset/setup/linux/frameworks/grails.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists grails-2.4.2
-[ $? -ne 0 ] || { echo "Grails is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.4.2.zip
 unzip -o grails-2.4.2.zip

+ 1 - 2
toolset/setup/linux/frameworks/jester.sh

@@ -1,7 +1,6 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists jester
-[ $? -ne 0 ] || { echo "Jester is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 git clone git://github.com/dom96/jester.git jester/jester

+ 1 - 2
toolset/setup/linux/frameworks/nawak.sh

@@ -1,7 +1,6 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists nawak
-[ $? -ne 0 ] || { echo "Nawak is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 git clone git://github.com/idlewan/nawak.git nawak/nawak

+ 1 - 2
toolset/setup/linux/frameworks/onion.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists onion
-[ $? -ne 0 ] || { echo "onion is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 git clone https://github.com/davidmoreno/onion.git
 

+ 1 - 2
toolset/setup/linux/frameworks/play1.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists play-1.2.5
-[ $? -ne 0 ] || { echo "Play version 1 is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://downloads.typesafe.com/releases/play-1.2.5.zip -O play-1.2.5.zip
 fw_unzip play-1.2.5.zip

+ 1 - 2
toolset/setup/linux/frameworks/play2.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists play-2.2.0
-[ $? -ne 0 ] || { echo "Play version 2 is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://downloads.typesafe.com/play/2.2.0/play-2.2.0.zip
 fw_unzip play-2.2.0.zip

+ 1 - 3
toolset/setup/linux/frameworks/siena.sh

@@ -1,9 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
-
 
 fw_exists play-1.2.5/modules/siena-2.0.6
-[ $? -ne 0 ] || { echo "Siena is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_depends play1
 yes | play-1.2.5/play1 install siena

+ 0 - 3
toolset/setup/linux/frameworks/treefrog.sh

@@ -1,16 +1,13 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/bin/treefrog
 ret1=$?
 fw_exists /usr/bin/tspawn
 ret2=$?
 if [ $ret1 -eq 0 ] && [ $ret2 -eq 0 ]; then 
-  echo "Treefrog is installed!"; 
   return 0;
 fi
 
-
 sudo apt-get install -y qt4-qmake libqt4-dev libqt4-sql-mysql libqt4-sql-psql g++
 
 fw_get http://downloads.sourceforge.net/project/treefrog/src/treefrog-1.7.5.tar.gz

+ 1 - 2
toolset/setup/linux/frameworks/vertx.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists vert.x-2.1.1
-[ $? -ne 0 ] || { echo "Vert.x is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://dl.bintray.com/vertx/downloads/vert.x-2.1.1.tar.gz?direct=true -O vert.x-2.1.1.tar.gz
 fw_untar vert.x-2.1.1.tar.gz

+ 1 - 2
toolset/setup/linux/frameworks/wt.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists wt
-[ $? -ne 0 ] || { echo "wt is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 # TODO can this be changed based on the OS we are using? This is not
 # available on 12.04 (libboost-all-dev is available, but requires some

+ 0 - 1
toolset/setup/linux/frameworks/yesod.sh

@@ -1,5 +1,4 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 cabal update
 cabal install yesod persistent-mysql

+ 4 - 17
toolset/setup/linux/installer.py

@@ -32,7 +32,9 @@ class Installer:
   def __install_server_software(self):
     print("\nINSTALL: Installing server software\n")
     
-    self.__run_command("sh ../toolset/setup/linux/prerequisites.sh")
+    bash_functions_path='../toolset/setup/linux/bash_functions.sh'
+    prereq_path='../toolset/setup/linux/prerequisites.sh'
+    self.__run_command(". %s && . %s" % (bash_functions_path, prereq_path))
 
     # Pull in benchmarker include and exclude list
     exclude = self.benchmarker.exclude
@@ -265,27 +267,12 @@ EOF
     while attempt <= max_attempts:
       error_message = ""
       try:
-	##print "working in " + cwd + " on " + command
         # Execute command.
-        """if command == "make clean":
-          print "make clean if statment"
-	  time.sleep(5)
-	  subprocess.check_call("make clean", shell=False, cwd=cwd)
-	  break"""
-        subprocess.check_call(command, shell=True, cwd=cwd)
-        """if send_yes:
-          process = subprocess.Popen(["/bin/bash", "-c", command], shell=False, stdin=subprocess.PIPE, cwd=cwd)
-          process.communicate("yes")
-          returncode = process.returncode
-          if returncode:
-            raise subprocess.CalledProcessError(returncode, command)
-        else:
-          subprocess.check_call(["/bin/bash", "-c", command], shell=False, cwd=cwd)"""
+        subprocess.check_call(command, shell=True, cwd=cwd, executable='/bin/bash')
         break  # Exit loop if successful.
       except:
         exceptionType, exceptionValue, exceptionTraceBack = sys.exc_info()
         error_message = "".join(traceback.format_exception_only(exceptionType, exceptionValue))
-        print error_message
 
       # Exit if there are no more attempts left.
       attempt += 1

+ 1 - 2
toolset/setup/linux/languages/composer.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists bin/composer.phar
-[ $? -ne 0 ] || { echo "Composer is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_depends php
 fw_get https://getcomposer.org/installer -O composer-installer.php

+ 1 - 2
toolset/setup/linux/languages/dart.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists dart-sdk
-[ $? -ne 0 ] || { echo "Dart is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip
 fw_unzip dartsdk-linux-x64-release.zip

+ 1 - 2
toolset/setup/linux/languages/elixir.sh

@@ -1,11 +1,10 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 # TODO seems to be broken installation
 echo "WARN: Elixir does not install"
 
 # fw_exists v0.13.3.tar.gz
-# [ $? -ne 0 ] || { echo "Elixir is installed!"; return 0; }
+# [ $? -ne 0 ] || { return 0; }
 
 # fw_get https://github.com/elixir-lang/elixir/archive/v0.13.3.tar.gz
 # fw_untar v0.13.3.tar.gz

+ 1 - 2
toolset/setup/linux/languages/erlang.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/bin/erl
-[ $? -ne 0 ] || { echo "Erlang is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 sudo cp ../config/erlang.list /etc/apt/sources.list.d/erlang.list
 

+ 1 - 2
toolset/setup/linux/languages/go.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists go
-[ $? -ne 0 ] || { echo "Go is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get https://storage.googleapis.com/golang/go1.3.linux-amd64.tar.gz
 fw_untar go1.3.linux-amd64.tar.gz

+ 1 - 2
toolset/setup/linux/languages/haskell.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 # TODO check this path...
 fw_exists /usr/bin/haskell-compiler
-[ $? -ne 0 ] || { echo "Haskell is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 sudo apt-get install -y ghc cabal-install

+ 1 - 2
toolset/setup/linux/languages/hhvm.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/bin/hhvm
-[ $? -ne 0 ] || { echo "hhvm is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 sudo add-apt-repository -y ppa:mapnik/v2.2.0
 wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -

+ 0 - 1
toolset/setup/linux/languages/java.sh

@@ -1,5 +1,4 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 # TODO include a check before we do all this, because it's 
 # annoyingly slow to run apt-get if we don't need to

+ 1 - 2
toolset/setup/linux/languages/jruby.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists ~/.rvm/rubies/jruby-1.7.8/
-[ $? -ne 0 ] || { echo "JRuby is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 # Instead of installing separately, we install JRuby 
 # whenever we install Ruby

+ 1 - 3
toolset/setup/linux/languages/mono.sh

@@ -1,11 +1,9 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists mono-3.2.8
 [ $? -ne 0 ] || { \
-  echo "Mono is installed, installing RootCAs from Mozilla..."; 
+  echo "Installing RootCAs from Mozilla..."; 
   mozroots --import --sync;
-  echo "Mono is installed!"
   return 0; }
 
 fw_get http://download.mono-project.com/sources/mono/mono-3.2.8.tar.bz2 -O mono-3.2.8.tar.bz2

+ 2 - 3
toolset/setup/linux/languages/nimrod.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists nimrod/bin/nimrod
-[ $? -ne 0 ] || { echo "Nimrod is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 test -d nimrod || git clone git://github.com/Araq/Nimrod.git nimrod
 cd nimrod 
@@ -16,7 +15,7 @@ chmod +x build.sh
 
 cd ../..
 fw_exists nimrod/koch
-[ $? -ne 0 ] || { echo "Nimrod Koch is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 cd nimrod
 bin/nimrod c koch

+ 2 - 3
toolset/setup/linux/languages/nodejs.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists node-v0.10.8-linux-x64
-[ $? -ne 0 ] || { echo "NodeJS is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://nodejs.org/dist/v0.10.8/node-v0.10.8-linux-x64.tar.gz
-fw_untar node-v0.10.8-linux-x64.tar.gz
+fw_untar node-v0.10.8-linux-x64.tar.gz

+ 1 - 2
toolset/setup/linux/languages/perl.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists perl-5.18
-[ $? -ne 0 ] || { echo "Perl is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get https://raw.githubusercontent.com/tokuhirom/Perl-Build/master/perl-build -O perl-build.pl
 perl perl-build.pl -DDEBUGGING=-g 5.18.2 perl-5.18

+ 1 - 2
toolset/setup/linux/languages/phalcon.sh

@@ -1,9 +1,8 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_depends php
 fw_exists /usr/local/lib/php/extensions/no-debug-non-zts-20100525/phalcon.so
-[ $? -ne 0 ] || { echo "Phalcon is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 test -d cphalcon || git clone git://github.com/phalcon/cphalcon.git
 cd cphalcon/build && sudo ./install

+ 4 - 5
toolset/setup/linux/languages/php.sh

@@ -1,13 +1,12 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
-# TODO double check this, it's logically different from original python code.
-# Two path checks would both always run in python. In this code the check 
+# TODO double check this, it's logically different from original php code.
+# Two path checks would both always run in php. In this code the check 
 # for apc.so only happens if the check for php fails. Is that ok? 
 
 fw_exists /usr/local/bin/php
 [ $? -ne 0 ] || { \
-  echo "PHP is installed!"; 
+  echo "Moving PHP config files into place"; 
   sudo cp ../config/php.ini /usr/local/lib/php.ini
   sudo cp ../config/php-fpm.conf /usr/local/lib/php-fpm.conf
   return 0; }
@@ -21,7 +20,7 @@ sudo make install
 
 cd ..
 fw_exists /usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so
-[ $? -ne 0 ] || { echo "PHP is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 cd php-5.4.13
 printf "\n" | sudo pecl install apc-beta

+ 1 - 2
toolset/setup/linux/languages/pypy.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists pypy
-[ $? -ne 0 ] || { echo "pypy is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get https://bitbucket.org/pypy/pypy/downloads/pypy-2.3.1-linux64.tar.bz2 -O pypy-2.3.1-linux64.tar.bz2
 tar vxf pypy-2.3.1-linux64.tar.bz2

+ 1 - 2
toolset/setup/linux/languages/python2.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists py2
-[ $? -ne 0 ] || { echo "Python2 is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 # fw_get http://www.python.org/ftp/python/2.7.7/Python-2.7.7.tgz
 # tar vxf Python-2.7.7.tgz

+ 1 - 2
toolset/setup/linux/languages/python3.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists py3
-[ $? -ne 0 ] || { echo "Python3 is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://www.python.org/ftp/python/3.4.1/Python-3.4.1.tar.xz
 tar vxf Python-3.4.1.tar.xz

+ 0 - 2
toolset/setup/linux/languages/racket.sh

@@ -1,12 +1,10 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists racket-5.3.6/bin/racket
 ret1=$?
 fw_exists racket-5.3.6/collects/racket
 ret2=$?
 if [ $ret1 -eq 0 ] && [$ret2 -eq 0 ]; then 
-  echo "Racket is installed!"; 
   return 0;
 fi
 

+ 1 - 2
toolset/setup/linux/languages/ringojs.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/share/ringojs
-[ $? -ne 0 ] || { echo "RingoJS is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://www.ringojs.org/downloads/ringojs_0.10-1_all.deb
 sudo apt-get install -y jsvc

+ 1 - 2
toolset/setup/linux/languages/ruby.sh

@@ -1,11 +1,10 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 curl -L get.rvm.io | bash -s head --auto-dotfiles
 echo rvm_auto_reload_flag=2 >> ~/.rvmrc
 
 fw_exists ~/.rvm/rubies/ruby-2.0.0-p0/
-[ $? -ne 0 ] || { echo "Ruby is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 . ~/.rvm/scripts/rvm
 . ~/.profile

+ 1 - 2
toolset/setup/linux/languages/urweb.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/local/bin/urweb
-[ $? -ne 0 ] || { echo "urweb is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 hg clone http://hg.impredicative.com/urweb
 cd urweb

+ 1 - 2
toolset/setup/linux/languages/xsp.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists xsp
-[ $? -ne 0 ] || { echo "XSP is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_depends mono
 git clone --depth 1 git://github.com/mono/xsp

+ 1 - 3
toolset/setup/linux/languages/yaf.sh

@@ -1,12 +1,10 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/local/lib/php/extensions/no-debug-non-zts-20100525/yaf.so
 [ $? -ne 0 ] || { \
-  echo "yaf is installed, enabling in configuration...";
+  echo "Enabling yaf in PHP configuration...";
   sudo cp ../config/php.ini /usr/local/lib/php.ini
   sudo cp ../config/php-fpm.conf /usr/local/lib/php-fpm.conf
-  echo "yaf is installed!"
   return 0; }
 
 fw_depends php

+ 1 - 6
toolset/setup/linux/prerequisites.sh

@@ -1,13 +1,9 @@
 #!/bin/bash
 
-. ../toolset/setup/linux/bash_functions.sh
-
 fw_exists fwbm_prereqs_installed
 [ $? -ne 0 ] || { \
   echo "Prerequisites installed!"; 
-  # Source files to be sure
-  . ~/.profile
-  return 0; 
+  return 0;
 }
 
 sudo apt-get -y update
@@ -42,7 +38,6 @@ fw_exists ~/.bash_profile.bak
 cp ../config/benchmark_profile ~/.bash_profile
 cat ../config/benchmark_profile >> ~/.profile
 cat ../config/benchmark_profile >> ~/.bashrc
-. ~/.profile
 sudo sh -c "echo '*               -    nofile          65535' >> /etc/security/limits.conf"
 
 touch fwbm_prereqs_installed

+ 1 - 2
toolset/setup/linux/systools/leiningen.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists bin/lein
-[ $? -ne 0 ] || { echo "Leiningen is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 mkdir -p bin
 fw_get https://raw.github.com/technomancy/leiningen/stable/bin/lein

+ 1 - 2
toolset/setup/linux/systools/maven.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/bin/mvn
-[ $? -ne 0 ] || { echo "Maven is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 sudo apt-get -y install maven -qq
 mvn -version

+ 1 - 2
toolset/setup/linux/webservers/lapis.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/local/bin/lapis
-[ $? -ne 0 ] || { echo "lapis is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 sudo apt-get install -y luarocks
 sudo luarocks install http://github.com/leafo/lapis/raw/master/lapis-dev-1.rockspec

+ 1 - 2
toolset/setup/linux/webservers/mongrel2.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/local/bin/mongrel2
-[ $? -ne 0 ] || { echo "Mongrel2 is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_depends zeromq
 

+ 1 - 2
toolset/setup/linux/webservers/nginx.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/local/nginx/sbin/nginx
-[ $? -ne 0 ] || { echo "Nginx is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://nginx.org/download/nginx-1.4.1.tar.gz
 fw_untar nginx-1.4.1.tar.gz

+ 1 - 2
toolset/setup/linux/webservers/openresty.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/local/openresty/nginx/sbin/nginx
-[ $? -ne 0 ] || { echo "OpenResty is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_depends nginx
 fw_get http://openresty.org/download/ngx_openresty-1.5.8.1.tar.gz

+ 1 - 2
toolset/setup/linux/webservers/resin.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists resin-4.0.36/conf/resin.xml
-[ $? -ne 0 ] || { echo "resin is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_depends java
 sudo cp -r /usr/lib/jvm/java-1.7.0-openjdk-amd64/include /usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/bin/

+ 1 - 2
toolset/setup/linux/webservers/weber.sh

@@ -1,9 +1,8 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 echo "WARN: Weber is not working"
 #fw_exists weber
-#[ $? -ne 0 ] || { echo "weber is installed!"; return 0; }
+#[ $? -ne 0 ] || { return 0; }
 
 #git clone https://github.com/elixir-web/weber.git
 

+ 1 - 2
toolset/setup/linux/webservers/zeromq.sh

@@ -1,8 +1,7 @@
 #!/bin/bash
-. ../toolset/setup/linux/bash_functions.sh
 
 fw_exists /usr/local/lib/libzmq.a
-[ $? -ne 0 ] || { echo "ZeroMQ is installed!"; return 0; }
+[ $? -ne 0 ] || { return 0; }
 
 fw_get http://download.zeromq.org/zeromq-4.0.3.tar.gz
 fw_untar zeromq-4.0.3.tar.gz