Browse Source

fw_installed bash function (#2471)

* create fw_installed bash function

* have setup files use fw_installed
Nate 8 years ago
parent
commit
ffa74b2351
77 changed files with 91 additions and 317 deletions
  1. 12 0
      toolset/setup/linux/bash_functions.sh
  2. 1 4
      toolset/setup/linux/databases/mongodb/mongodb.sh
  3. 1 4
      toolset/setup/linux/databases/mysql/mysql.sh
  4. 1 4
      toolset/setup/linux/databases/postgresql/postgresql.sh
  5. 1 4
      toolset/setup/linux/frameworks/cppsp.sh
  6. 2 5
      toolset/setup/linux/frameworks/cutelyst.sh
  7. 1 4
      toolset/setup/linux/frameworks/duda.sh
  8. 1 2
      toolset/setup/linux/frameworks/ffead-cpp-apache.sh
  9. 1 2
      toolset/setup/linux/frameworks/ffead-cpp-nginx.sh
  10. 1 2
      toolset/setup/linux/frameworks/ffead-cpp.sh
  11. 1 4
      toolset/setup/linux/frameworks/grails.sh
  12. 1 5
      toolset/setup/linux/frameworks/haywire.sh
  13. 1 4
      toolset/setup/linux/frameworks/hot.sh
  14. 1 4
      toolset/setup/linux/frameworks/jester.sh
  15. 1 5
      toolset/setup/linux/frameworks/libreactor.sh
  16. 1 4
      toolset/setup/linux/frameworks/lwan.sh
  17. 1 5
      toolset/setup/linux/frameworks/octane.sh
  18. 1 4
      toolset/setup/linux/frameworks/onion.sh
  19. 1 4
      toolset/setup/linux/frameworks/phalcon.sh
  20. 1 4
      toolset/setup/linux/frameworks/play1.sh
  21. 1 4
      toolset/setup/linux/frameworks/poco.sh
  22. 1 4
      toolset/setup/linux/frameworks/ringojs.sh
  23. 1 4
      toolset/setup/linux/frameworks/siena.sh
  24. 1 5
      toolset/setup/linux/frameworks/silicon.sh
  25. 2 4
      toolset/setup/linux/frameworks/treefrog.sh
  26. 1 4
      toolset/setup/linux/frameworks/ulib.sh
  27. 1 4
      toolset/setup/linux/frameworks/vertx.sh
  28. 1 4
      toolset/setup/linux/frameworks/wt.sh
  29. 1 4
      toolset/setup/linux/frameworks/yaf.sh
  30. 1 4
      toolset/setup/linux/languages/crystal.sh
  31. 1 4
      toolset/setup/linux/languages/dart.sh
  32. 1 4
      toolset/setup/linux/languages/dlang.sh
  33. 1 5
      toolset/setup/linux/languages/dotnetcore.sh
  34. 1 4
      toolset/setup/linux/languages/elixir.sh
  35. 1 4
      toolset/setup/linux/languages/erlang.sh
  36. 1 4
      toolset/setup/linux/languages/go.sh
  37. 1 4
      toolset/setup/linux/languages/haskell.sh
  38. 1 4
      toolset/setup/linux/languages/hhvm.sh
  39. 1 5
      toolset/setup/linux/languages/java.sh
  40. 1 4
      toolset/setup/linux/languages/lua.sh
  41. 1 5
      toolset/setup/linux/languages/mono.sh
  42. 1 4
      toolset/setup/linux/languages/nim.sh
  43. 1 4
      toolset/setup/linux/languages/nodejs.sh
  44. 1 4
      toolset/setup/linux/languages/perl.sh
  45. 1 5
      toolset/setup/linux/languages/php/php7.sh
  46. 1 4
      toolset/setup/linux/languages/pypy.sh
  47. 1 4
      toolset/setup/linux/languages/python2.sh
  48. 1 4
      toolset/setup/linux/languages/python3.sh
  49. 2 6
      toolset/setup/linux/languages/ruby/jruby-1.7.sh
  50. 1 5
      toolset/setup/linux/languages/ruby/jruby-9k.sh
  51. 1 5
      toolset/setup/linux/languages/ruby/ruby-2.0.sh
  52. 1 5
      toolset/setup/linux/languages/ruby/ruby-2.1.sh
  53. 1 5
      toolset/setup/linux/languages/ruby/ruby-2.2.sh
  54. 1 6
      toolset/setup/linux/languages/ruby/rvm.sh
  55. 1 4
      toolset/setup/linux/languages/rust.sh
  56. 1 4
      toolset/setup/linux/systools/ant.sh
  57. 1 4
      toolset/setup/linux/systools/clang-3.8.sh
  58. 1 4
      toolset/setup/linux/systools/clang-3.9.sh
  59. 1 4
      toolset/setup/linux/systools/composer.sh
  60. 1 4
      toolset/setup/linux/systools/dub.sh
  61. 1 5
      toolset/setup/linux/systools/gcc-4.9.sh
  62. 1 5
      toolset/setup/linux/systools/gcc-6.sh
  63. 1 4
      toolset/setup/linux/systools/leiningen.sh
  64. 1 4
      toolset/setup/linux/systools/luarocks.sh
  65. 1 4
      toolset/setup/linux/systools/maven.sh
  66. 1 4
      toolset/setup/linux/systools/mustache-c.sh
  67. 1 4
      toolset/setup/linux/systools/nimble.sh
  68. 1 4
      toolset/setup/linux/systools/sbt.sh
  69. 1 4
      toolset/setup/linux/systools/stack.sh
  70. 1 4
      toolset/setup/linux/systools/yajl.sh
  71. 1 4
      toolset/setup/linux/webservers/h2o.sh
  72. 1 4
      toolset/setup/linux/webservers/microhttpd.sh
  73. 1 4
      toolset/setup/linux/webservers/mongrel2.sh
  74. 1 4
      toolset/setup/linux/webservers/nginx.sh
  75. 1 4
      toolset/setup/linux/webservers/openresty.sh
  76. 1 4
      toolset/setup/linux/webservers/resin/resin.sh
  77. 1 4
      toolset/setup/linux/webservers/zeromq.sh

+ 12 - 0
toolset/setup/linux/bash_functions.sh

@@ -163,3 +163,15 @@ fw_exists() {
     echo 1
     echo 1
   fi 
   fi 
 }
 }
+
+# Checks to see if an installation exists and sources the install
+# file if it does
+fw_installed() {
+  if [ -f "$IROOT/$1.installed" ]; then
+    source "$IROOT/$1.installed"
+    return 0
+  else
+    return 1
+  fi     
+}
+

+ 1 - 4
toolset/setup/linux/databases/mongodb/mongodb.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends databases
 fw_depends databases
 
 
-RETCODE=$(fw_exists ${IROOT}/mongodb.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/mongodb.installed
-  return 0; }
+fw_installed mongodb && return 0
 
 
 # send over the required files
 # send over the required files
 scp $FWROOT/toolset/setup/linux/databases/mongodb/mongodb.conf $DBHOST:~/
 scp $FWROOT/toolset/setup/linux/databases/mongodb/mongodb.conf $DBHOST:~/

+ 1 - 4
toolset/setup/linux/databases/mysql/mysql.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends databases
 fw_depends databases
 
 
-RETCODE=$(fw_exists ${IROOT}/mysql.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/mysql.installed
-  return 0; }
+fw_installed mysql && return 0
 
 
 # send over the required files
 # send over the required files
 scp $FWROOT/toolset/setup/linux/databases/mysql/create.sql $DBHOST:~/
 scp $FWROOT/toolset/setup/linux/databases/mysql/create.sql $DBHOST:~/

+ 1 - 4
toolset/setup/linux/databases/postgresql/postgresql.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends databases
 fw_depends databases
 
 
-RETCODE=$(fw_exists ${IROOT}/postgresql.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/postgresql.installed
-  return 0; }
+fw_installed postgresql && return 0
 
 
 # delete any old required files that do not belong to us as
 # delete any old required files that do not belong to us as
 # scp will fail otherwise
 # scp will fail otherwise

+ 1 - 4
toolset/setup/linux/frameworks/cppsp.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/cppsp.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/cppsp.installed
-  return 0; }
+fw_installed cppsp && return 0
 
 
 VERSION=0.2.3
 VERSION=0.2.3
 CPPSP_HOME=$IROOT/cppsp_$VERSION
 CPPSP_HOME=$IROOT/cppsp_$VERSION

+ 2 - 5
toolset/setup/linux/frameworks/cutelyst.sh

@@ -1,11 +1,8 @@
 #!/bin/bash
 #!/bin/bash
 
 
-CUTELYST_VER=r1.0.0
-RETCODE=$(fw_exists ${IROOT}/cutelyst.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/cutelyst.installed
-  return 0; }
+fw_installed cutelyst && return 0
 
 
+CUTELYST_VER=r1.0.0
 QT_VERSION_MM=56
 QT_VERSION_MM=56
 QT_VERSION_FULL=562-trusty
 QT_VERSION_FULL=562-trusty
 
 

+ 1 - 4
toolset/setup/linux/frameworks/duda.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/duda.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/duda.installed
-  return 0; }
+fw_installed duda && return 0
 
 
 git clone https://github.com/monkey/dudac.git
 git clone https://github.com/monkey/dudac.git
 
 

+ 1 - 2
toolset/setup/linux/frameworks/ffead-cpp-apache.sh

@@ -1,7 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/ffead-cpp-apache.installed)
-[ ! "$RETCODE" == 0 ] || { return 0; }
+fw_installed ffead-cpp-apache && return 0
 
 
 fw_get -o unixODBC-2.3.4.tar.gz ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz
 fw_get -o unixODBC-2.3.4.tar.gz ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz
 fw_untar unixODBC-2.3.4.tar.gz
 fw_untar unixODBC-2.3.4.tar.gz

+ 1 - 2
toolset/setup/linux/frameworks/ffead-cpp-nginx.sh

@@ -1,7 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/ffead-cpp-nginx.installed)
-[ ! "$RETCODE" == 0 ] || { return 0; }
+fw_installed ffead-cpp-nginx && return 0
 
 
 fw_get -o unixODBC-2.3.4.tar.gz ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz
 fw_get -o unixODBC-2.3.4.tar.gz ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz
 fw_untar unixODBC-2.3.4.tar.gz
 fw_untar unixODBC-2.3.4.tar.gz

+ 1 - 2
toolset/setup/linux/frameworks/ffead-cpp.sh

@@ -1,7 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/ffead-cpp.installed)
-[ ! "$RETCODE" == 0 ] || { return 0; }
+fw_installed ffead-cpp && return 0
 
 
 sudo apt-get remove -y libodbc1 unixodbc unixodbc-dev
 sudo apt-get remove -y libodbc1 unixodbc unixodbc-dev
 
 

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/grails.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/grails.installed
-  return 0; }
+fw_installed grails && return 0
 
 
 VERSION="2.4.4"
 VERSION="2.4.4"
 GRAILS_HOME=$IROOT/grails-$VERSION
 GRAILS_HOME=$IROOT/grails-$VERSION

+ 1 - 5
toolset/setup/linux/frameworks/haywire.sh

@@ -1,10 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/haywire.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/haywire.installed
-  return 0; }
+fw_installed haywire && return 0
 
 
 HAYWIRE_HOME=$IROOT/Haywire
 HAYWIRE_HOME=$IROOT/Haywire
  
  

+ 1 - 4
toolset/setup/linux/frameworks/hot.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/hot.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/hot.installed
-  return 0; }
+fw_installed hot && return 0
 
 
 VERSION="0.9.2-SNAPSHOT"
 VERSION="0.9.2-SNAPSHOT"
 HOT_HOME=$IROOT/hot-$VERSION
 HOT_HOME=$IROOT/hot-$VERSION

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

@@ -2,10 +2,7 @@
 
 
 fw_depends nim nimble
 fw_depends nim nimble
 
 
-RETCODE=$(fw_exists ${IROOT}/jester.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/jester.installed
-  return 0; }
+fw_installed jester && return 0
 
 
 JESTER=$IROOT/jester
 JESTER=$IROOT/jester
 
 

+ 1 - 5
toolset/setup/linux/frameworks/libreactor.sh

@@ -2,11 +2,7 @@
 
 
 fw_depends gcc-4.9
 fw_depends gcc-4.9
 
 
-RETCODE=$(fw_exists ${IROOT}/libreactor.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/libreactor.installed
-  return 0; }
+fw_installed libreactor && return 0
 
 
 LIBREACTOR_HOME=$IROOT/libreactor_techempower
 LIBREACTOR_HOME=$IROOT/libreactor_techempower
 
 

+ 1 - 4
toolset/setup/linux/frameworks/lwan.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends libjemalloc-dev libluajit-5.1-dev
 fw_depends libjemalloc-dev libluajit-5.1-dev
 
 
-RETCODE=$(fw_exists ${IROOT}/lwan.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/lwan.installed
-  return 0; }
+fw_installed lwan && return 0
 
 
 REV='ff549b46548fefb2a1dd2a4c6a22c345fcfb3eeb'
 REV='ff549b46548fefb2a1dd2a4c6a22c345fcfb3eeb'
 LWAN_HOME=$IROOT/lwan
 LWAN_HOME=$IROOT/lwan

+ 1 - 5
toolset/setup/linux/frameworks/octane.sh

@@ -1,10 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/octane.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/octane.installed
-  return 0; }
+fw_installed octane && return 0
 
 
 OCTANE_HOME=$IROOT/octane
 OCTANE_HOME=$IROOT/octane
 
 

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/onion.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/onion.installed
-  return 0; }
+fw_installed onion && return 0
 
 
 git clone https://github.com/davidmoreno/onion.git
 git clone https://github.com/davidmoreno/onion.git
 cd $IROOT/onion
 cd $IROOT/onion

+ 1 - 4
toolset/setup/linux/frameworks/phalcon.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends php7
 fw_depends php7
 
 
-RETCODE=$(fw_exists ${IROOT}/phalcon.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/phalcon.installed
-  return 0; }
+fw_installed phalcon && return 0
 
 
 # Enable the PHP phalcon extension
 # Enable the PHP phalcon extension
 sed -i 's|;extension=phalcon.so|extension=phalcon.so|g' $PHP_HOME/lib/php.ini
 sed -i 's|;extension=phalcon.so|extension=phalcon.so|g' $PHP_HOME/lib/php.ini

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/play1.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/play1.installed
-  return 0; }
+fw_installed play1 && return 0
 
 
 VERSION="1.2.5"
 VERSION="1.2.5"
 PLAY1_HOME=$IROOT/play-$VERSION
 PLAY1_HOME=$IROOT/play-$VERSION

+ 1 - 4
toolset/setup/linux/frameworks/poco.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/poco.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/poco.installed
-  return 0; }
+fw_installed poco && return 0
 
 
 VERSION=1.6.1
 VERSION=1.6.1
 POCO_HOME=$IROOT/poco_$VERSION
 POCO_HOME=$IROOT/poco_$VERSION

+ 1 - 4
toolset/setup/linux/frameworks/ringojs.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/ringojs.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/ringojs.installed
-  return 0; }
+fw_installed ringojs && return 0
 
 
 VERSION="0.11"
 VERSION="0.11"
 RINGOJS=$IROOT/ringojs_$VERSION
 RINGOJS=$IROOT/ringojs_$VERSION

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

@@ -2,10 +2,7 @@
 
 
 fw_depends play1
 fw_depends play1
 
 
-RETCODE=$(fw_exists ${IROOT}/siena.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/siena.installed
-  return 0; }
+fw_installed siena && return 0
 
 
 VERSION="2.0.6"
 VERSION="2.0.6"
 SIENNA=$IROOT/siena-$VERSION
 SIENNA=$IROOT/siena-$VERSION

+ 1 - 5
toolset/setup/linux/frameworks/silicon.sh

@@ -2,11 +2,7 @@
 
 
 fw_depends libboost-dev clang-3.9 gcc-4.9
 fw_depends libboost-dev clang-3.9 gcc-4.9
 
 
-RETCODE=$(fw_exists ${IROOT}/silicon.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/silicon.installed
-  return 0; }
+fw_installed silicon && return 0
 
 
 SILICON=$IROOT/silicon
 SILICON=$IROOT/silicon
 
 

+ 2 - 4
toolset/setup/linux/frameworks/treefrog.sh

@@ -1,10 +1,8 @@
 #!/bin/bash
 #!/bin/bash
 
 
+fw_installed treefrog && return 0
+
 TFVER=treefrog-1.12.0
 TFVER=treefrog-1.12.0
-RETCODE=$(fw_exists ${IROOT}/treefrog.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/treefrog.installed
-  return 0; }
 
 
 sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
 sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
 sudo apt-get update -qq
 sudo apt-get update -qq

+ 1 - 4
toolset/setup/linux/frameworks/ulib.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends gcc-4.9
 fw_depends gcc-4.9
 
 
-RETCODE=$(fw_exists ${IROOT}/ulib.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/ulib.installed
-  return 0; }
+fw_installed ulib && return 0
 
 
 ULIB_VERSION=1.4.2
 ULIB_VERSION=1.4.2
 ULIB_ROOT=$IROOT/ULib
 ULIB_ROOT=$IROOT/ULib

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/vertx.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/vertx.installed
-  return 0; }
+fw_installed vertx && return 0
 
 
 VERSION="2.1.5"
 VERSION="2.1.5"
 FREEMAKER_VERSION="2.3.22"
 FREEMAKER_VERSION="2.3.22"

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/wt.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/wt.installed
-  return 0; }
+fw_installed wt && return 0
 
 
 BOOST_ROOT=/usr/local
 BOOST_ROOT=/usr/local
 BOOST_INC=${BOOST_ROOT}/include
 BOOST_INC=${BOOST_ROOT}/include

+ 1 - 4
toolset/setup/linux/frameworks/yaf.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends php5
 fw_depends php5
 
 
-RETCODE=$(fw_exists ${IROOT}/yaf.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/yaf.installed
-  return 0; }
+fw_installed yaf && return 0
 
 
 # Enable the PHP yaf extension
 # Enable the PHP yaf extension
 sed -i 's|;extension=yaf.so|extension=yaf.so|g' $PHP_HOME/lib/php.ini
 sed -i 's|;extension=yaf.so|extension=yaf.so|g' $PHP_HOME/lib/php.ini

+ 1 - 4
toolset/setup/linux/languages/crystal.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/crystal.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/crystal.installed
-  return 0; }
+fw_installed crystal && return 0
 
 
 # install crystal
 # install crystal
 
 

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/dart-sdk.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/dart-sdk.installed
-  return 0; }
+fw_installed dart-sdk && return 0
 
 
 DART_HOME=$IROOT/dart-sdk
 DART_HOME=$IROOT/dart-sdk
 
 

+ 1 - 4
toolset/setup/linux/languages/dlang.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends xdg-utils
 fw_depends xdg-utils
 
 
-RETCODE=$(fw_exists ${IROOT}/dlang.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/dlang.installed
-  return 0; }  
+fw_installed dlang && return 0
 
 
 DLANG=$IROOT/dlang
 DLANG=$IROOT/dlang
 DMDVER="2.071.1"
 DMDVER="2.071.1"

+ 1 - 5
toolset/setup/linux/languages/dotnetcore.sh

@@ -1,10 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/dotnetcore.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/dotnetcore.installed
-  dotnet --info
-  return 0; }
+fw_installed dotnetcore && return 0
 
 
 sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' 
 sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' 
 sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
 sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893

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

@@ -2,10 +2,7 @@
 
 
 fw_depends erlang
 fw_depends erlang
 
 
-RETCODE=$(fw_exists ${IROOT}/elixir.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/elixir.installed
-  return 0; }
+fw_installed elixir && return 0
 
 
 ELIXIR_HOME=$IROOT/elixir
 ELIXIR_HOME=$IROOT/elixir
 VERSION="1.3.3-1"
 VERSION="1.3.3-1"

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/erlang.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/erlang.installed
-  return 0; }
+fw_installed erlang && return 0
 
 
 VERSION="18.2-2"
 VERSION="18.2-2"
 RELEASE="trusty"
 RELEASE="trusty"

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/go.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/go.installed
-  return 0; }
+fw_installed go && return 0
 
 
 VERSION=1.7
 VERSION=1.7
 GOROOT=$IROOT/go
 GOROOT=$IROOT/go

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

@@ -1,9 +1,6 @@
 #!/bin/bash 
 #!/bin/bash 
 
 
-RETCODE=$(fw_exists ${IROOT}/haskell.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/haskell.installed
-  return 0; }
+fw_installed haskell && return 0
 
 
 CABAL_HOME=/opt/cabal/1.20
 CABAL_HOME=/opt/cabal/1.20
 HASKELL_HOME=/opt/ghc/7.8.3
 HASKELL_HOME=/opt/ghc/7.8.3

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/hhvm.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/hhvm.installed
-  return 0; }
+fw_installed hhvm && return 0
 
 
 # TODO: Someday move away from apt-get
 # TODO: Someday move away from apt-get
 fw_get http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
 fw_get http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -

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

@@ -1,10 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists java.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/java.installed
-  return 0; }
+fw_installed java && return 0
 
 
 # TODO: Someday get away from apt-get
 # TODO: Someday get away from apt-get
 sudo add-apt-repository -y ppa:webupd8team/java
 sudo add-apt-repository -y ppa:webupd8team/java

+ 1 - 4
toolset/setup/linux/languages/lua.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/lua.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/lua.installed
-  return 0; }
+fw_installed lua && return 0
 
 
 LUA_VERSION="5.1"
 LUA_VERSION="5.1"
 LUA_MICRO="5"
 LUA_MICRO="5"

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

@@ -1,10 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists $IROOT/mono.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/mono.installed
-  return 0; }
+fw_installed mono && return 0
   
   
 # Add source for prepackaged binaries
 # Add source for prepackaged binaries
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

+ 1 - 4
toolset/setup/linux/languages/nim.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/nim.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/nim.installed
-  return 0; }
+fw_installed nim && return 0
 
 
 NIM_VERSION="0.11.2"
 NIM_VERSION="0.11.2"
 NIM_CSOURCES="6bf2282"
 NIM_CSOURCES="6bf2282"

+ 1 - 4
toolset/setup/linux/languages/nodejs.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/node.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/node.installed
-  return 0; }
+fw_installed node && return 0
 
 
 VERSION="6.3.0"
 VERSION="6.3.0"
 
 

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/perl.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/perl.installed
-  return 0; }
+fw_installed perl && return 0
 
 
 VERSION="5.18"
 VERSION="5.18"
 PERL=$IROOT/perl-$VERSION
 PERL=$IROOT/perl-$VERSION

+ 1 - 5
toolset/setup/linux/languages/php/php7.sh

@@ -1,10 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/php7.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  echo "Moving PHP config files into place";
-  source $IROOT/php7.installed
-  return 0; }
+fw_installed php7 && return 0
 
 
 VERSION="7.0.1"
 VERSION="7.0.1"
 PHP_HOME=$IROOT/php-$VERSION
 PHP_HOME=$IROOT/php-$VERSION

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/pypy.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/pypy.installed
-  return 0; }
+fw_installed pypy && return 0
   
   
 PYPY_ROOT=$IROOT/pypy
 PYPY_ROOT=$IROOT/pypy
 PYPY_VERSION=5.0.1
 PYPY_VERSION=5.0.1

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/py2.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/py2.installed
-  return 0; }
+fw_installed py2 && return 0
 
 
 PY2_ROOT=$IROOT/py2
 PY2_ROOT=$IROOT/py2
 PY2_VERSION=2.7.11
 PY2_VERSION=2.7.11

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/py3.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/py3.installed
-  return 0; }
+fw_installed py3 && return 0
   
   
 PY3_ROOT=$IROOT/py3
 PY3_ROOT=$IROOT/py3
 PY3_VERSION=3.5.1
 PY3_VERSION=3.5.1

+ 2 - 6
toolset/setup/linux/languages/ruby/jruby-1.7.sh

@@ -2,16 +2,12 @@
 
 
 fw_depends rvm java
 fw_depends rvm java
 
 
-RETCODE=$(fw_exists ${IROOT}/jruby-${JRUBY_VERSION}.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/jruby-$JRUBY_VERSION.installed
-  return 0; }
-
 # rvm stable [typically] only provides one version of jruby-1.7
 # rvm stable [typically] only provides one version of jruby-1.7
 # update this when it changes
 # update this when it changes
 JRUBY_VERSION="1.7.9"
 JRUBY_VERSION="1.7.9"
 
 
+fw_installed jruby-$JRUBY_VERSION && return 0
+
 rvm install jruby-$JRUBY_VERSION
 rvm install jruby-$JRUBY_VERSION
 # Bundler is SOMETIMES missing... not sure why.
 # Bundler is SOMETIMES missing... not sure why.
 rvm jruby-$JRUBY_VERSION do gem install bundler
 rvm jruby-$JRUBY_VERSION do gem install bundler

+ 1 - 5
toolset/setup/linux/languages/ruby/jruby-9k.sh

@@ -2,11 +2,7 @@
 
 
 fw_depends rvm java
 fw_depends rvm java
 
 
-RETCODE=$(fw_exists ${IROOT}/jruby-9k.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/jruby-9k.installed
-  return 0; }
+fw_installed jruby-9k && return 0
 
 
 # rvm stable [typically] only provides one version of jruby-9.0
 # rvm stable [typically] only provides one version of jruby-9.0
 # update this when it changes
 # update this when it changes

+ 1 - 5
toolset/setup/linux/languages/ruby/ruby-2.0.sh

@@ -2,11 +2,7 @@
 
 
 fw_depends llvm-dev rvm
 fw_depends llvm-dev rvm
 
 
-RETCODE=$(fw_exists ${IROOT}/ruby-2.0.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/ruby-2.0.installed
-  return 0; }
+fw_installed ruby-2.0 && return 0
 
 
 # rvm stable [typically] only provides one version of ruby-2.0
 # rvm stable [typically] only provides one version of ruby-2.0
 # update this when it changes
 # update this when it changes

+ 1 - 5
toolset/setup/linux/languages/ruby/ruby-2.1.sh

@@ -2,11 +2,7 @@
 
 
 fw_depends llvm-dev rvm
 fw_depends llvm-dev rvm
 
 
-RETCODE=$(fw_exists ${IROOT}/ruby-2.1.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/ruby-2.1.installed
-  return 0; }
+fw_installed ruby-2.1 && return 0
 
 
 # rvm stable [typically] only provides one version of ruby-2.1
 # rvm stable [typically] only provides one version of ruby-2.1
 # update this when it changes
 # update this when it changes

+ 1 - 5
toolset/setup/linux/languages/ruby/ruby-2.2.sh

@@ -2,11 +2,7 @@
 
 
 fw_depends llvm-dev rvm
 fw_depends llvm-dev rvm
 
 
-RETCODE=$(fw_exists ${IROOT}/ruby-2.2.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/ruby-2.2.installed
-  return 0; }
+fw_installed ruby-2.2 && return 0
 
 
 # rvm stable [typically] only provides one version of ruby-2.2
 # rvm stable [typically] only provides one version of ruby-2.2
 # update this when it changes
 # update this when it changes

+ 1 - 6
toolset/setup/linux/languages/ruby/rvm.sh

@@ -1,11 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/rvm.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Assume single-user installation
-  source $IROOT/rvm.installed
-  return 0;
-}
+fw_installed rvm && return 0
 
 
 export SHELL=/bin/bash
 export SHELL=/bin/bash
 gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
 gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

+ 1 - 4
toolset/setup/linux/languages/rust.sh

@@ -2,10 +2,7 @@
 
 
 RUST_VERSION="1.13.0"
 RUST_VERSION="1.13.0"
 
 
-RETCODE=$(fw_exists $IROOT/rust.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/rust.installed;
-  return 0; }
+fw_installed rust && return 0
 
 
 fw_get -O https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz
 fw_get -O https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz
 fw_untar rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz
 fw_untar rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz

+ 1 - 4
toolset/setup/linux/systools/ant.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/ant.installed)
-[ ! "$RETCODE" == 0 ] || { \
-source $IROOT/ant.installed
-return 0; }
+fw_installed ant && return 0
 
 
 sudo apt-get update
 sudo apt-get update
 sudo apt-get -y --force-yes install ant
 sudo apt-get -y --force-yes install ant

+ 1 - 4
toolset/setup/linux/systools/clang-3.8.sh

@@ -1,10 +1,7 @@
 #!/bin/bash
 #!/bin/bash
 
 
 
 
-RETCODE=$(fw_exists ${IROOT}/clang-3.8.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/clang-3.8.installed
-  return 0; }
+fw_installed clang-3.8 && return 0
 
 
 sudo add-apt-repository -s "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-3.8 main"
 sudo add-apt-repository -s "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-3.8 main"
 wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
 wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -

+ 1 - 4
toolset/setup/linux/systools/clang-3.9.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/clang-3.9.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/clang-3.9.installed
-  return 0; }
+fw_installed clang-3.9 && return 0
 
 
 sudo add-apt-repository -s "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-3.9 main"
 sudo add-apt-repository -s "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-3.9 main"
 wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
 wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -

+ 1 - 4
toolset/setup/linux/systools/composer.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/composer.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/composer.installed
-  return 0; }
+fw_installed composer && return 0
 
 
 COMPOSER_HOME=$IROOT/php-composer
 COMPOSER_HOME=$IROOT/php-composer
 
 

+ 1 - 4
toolset/setup/linux/systools/dub.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/dub.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/dub.installed
-  return 0; }
+fw_installed dub && return 0
 
 
 mkdir dub
 mkdir dub
 cd dub
 cd dub

+ 1 - 5
toolset/setup/linux/systools/gcc-4.9.sh

@@ -1,10 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-
-RETCODE=$(fw_exists ${IROOT}/gcc-4.9.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/gcc-4.9.installed
-  return 0; }
+fw_installed gcc-4.9 && return 0
 
 
 sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 sudo apt-get -yq update
 sudo apt-get -yq update

+ 1 - 5
toolset/setup/linux/systools/gcc-6.sh

@@ -1,10 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-
-RETCODE=$(fw_exists ${IROOT}/gcc-6.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/gcc-6.installed
-  return 0; }
+fw_installed gcc-6 && return 0
 
 
 sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 sudo apt-get -yq update
 sudo apt-get -yq update

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/lein.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/lein.installed
-  return 0; }
+fw_installed lein && return 0
 
 
 mkdir -p lein/bin
 mkdir -p lein/bin
 fw_get -o leinbin https://raw.github.com/technomancy/leiningen/stable/bin/lein
 fw_get -o leinbin https://raw.github.com/technomancy/leiningen/stable/bin/lein

+ 1 - 4
toolset/setup/linux/systools/luarocks.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends lua
 fw_depends lua
 
 
-RETCODE=$(fw_exists ${IROOT}/luarocks.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/luarocks.installed
-  return 0; }
+fw_installed luarocks && return 0
 
 
 LUAROCKS_VERSION="2.2.1"
 LUAROCKS_VERSION="2.2.1"
 LUAROCKS=$IROOT/luarocks-$LUAROCKS_VERSION
 LUAROCKS=$IROOT/luarocks-$LUAROCKS_VERSION

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/maven.installed)
-[ ! "$RETCODE" == 0 ] || { \
-source $IROOT/maven.installed
-return 0; }
+fw_installed maven && return 0
 
 
 sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main"
 sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main"
 sudo apt-get update
 sudo apt-get update

+ 1 - 4
toolset/setup/linux/systools/mustache-c.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists "${IROOT}/mustache-c.installed")
-[ ! "$RETCODE" == 0 ] || { \
-  source "${IROOT}/mustache-c.installed"
-  return 0; }
+fw_installed mustache-c && return 0
 
 
 MUSTACHE_C_HOME="${IROOT}/mustache-c"
 MUSTACHE_C_HOME="${IROOT}/mustache-c"
 BUILD_DIR="${MUSTACHE_C_HOME}_build"
 BUILD_DIR="${MUSTACHE_C_HOME}_build"

+ 1 - 4
toolset/setup/linux/systools/nimble.sh

@@ -2,10 +2,7 @@
 
 
 fw_depends nim
 fw_depends nim
 
 
-RETCODE=$(fw_exists ${IROOT}/nimble.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/nimble.installed
-  return 0; }
+fw_installed nimble && return 0
   
   
 NIMBLE_VERSION="0.6.2"
 NIMBLE_VERSION="0.6.2"
 
 

+ 1 - 4
toolset/setup/linux/systools/sbt.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/sbt.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/sbt.installed
-  return 0; }
+fw_installed sbt && return 0
   
   
 VERSION="0.13.9"
 VERSION="0.13.9"
 
 

+ 1 - 4
toolset/setup/linux/systools/stack.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/stack.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/stack.installed
-  return 0; }
+fw_installed stack && return 0
 
 
 fw_get -o $IROOT/stack.tar.gz https://www.stackage.org/stack/linux-x86_64
 fw_get -o $IROOT/stack.tar.gz https://www.stackage.org/stack/linux-x86_64
 tar xzf $IROOT/stack.tar.gz
 tar xzf $IROOT/stack.tar.gz

+ 1 - 4
toolset/setup/linux/systools/yajl.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists "${IROOT}/yajl.installed")
-[ ! "$RETCODE" == 0 ] || { \
-  source "${IROOT}/yajl.installed"
-  return 0; }
+fw_installed yajl && return 0
 
 
 VERSION="2.1.0"
 VERSION="2.1.0"
 ARCHIVE="${VERSION}.tar.gz"
 ARCHIVE="${VERSION}.tar.gz"

+ 1 - 4
toolset/setup/linux/webservers/h2o.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists "${IROOT}/h2o.installed")
-[ ! "$RETCODE" == 0 ] || { \
-  source "${IROOT}/h2o.installed"
-  return 0; }
+fw_installed h2o && return 0
 
 
 H2O_HOME="${IROOT}/h2o"
 H2O_HOME="${IROOT}/h2o"
 VERSION="2.1.0-beta4"
 VERSION="2.1.0-beta4"

+ 1 - 4
toolset/setup/linux/webservers/microhttpd.sh

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/microhttpd.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/microhttpd.installed
-  return 0; }
+fw_installed microhttpd && return 0
 
 
 VERSION=0.9.39
 VERSION=0.9.39
 MICROHTTPD=$IROOT/libmicrohttpd
 MICROHTTPD=$IROOT/libmicrohttpd

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

@@ -2,10 +2,7 @@
 
 
 fw_depends zeromq
 fw_depends zeromq
 
 
-RETCODE=$(fw_exists ${IROOT}/mongrel2.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/mongrel2.installed
-  return 0; }
+fw_installed mongrel2 && return 0
 
 
 MONGREL2=$IROOT/mongrel2
 MONGREL2=$IROOT/mongrel2
 MONGREL2_VERSION="v1.8.1"
 MONGREL2_VERSION="v1.8.1"

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/nginx.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/nginx.installed
-  return 0; }
+fw_installed nginx && return 0
 
 
 NGINX_HOME=$IROOT/nginx
 NGINX_HOME=$IROOT/nginx
 
 

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

@@ -2,10 +2,7 @@
 
 
 fw_depends lua
 fw_depends lua
 
 
-RETCODE=$(fw_exists ${IROOT}/openresty.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/openresty.installed
-  return 0; }
+fw_installed openresty && return 0
 
 
 OPENRESTY_VERSION="1.11.2.1"
 OPENRESTY_VERSION="1.11.2.1"
 OPENRESTY=$IROOT/openresty
 OPENRESTY=$IROOT/openresty

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

@@ -2,10 +2,7 @@
 
 
 fw_depends java
 fw_depends java
 
 
-RETCODE=$(fw_exists ${IROOT}/resin.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/resin.installed
-  return 0; }
+fw_installed resin && return 0
 
 
 RVER=4.0.48
 RVER=4.0.48
 RESIN=resin-$RVER
 RESIN=resin-$RVER

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

@@ -1,9 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists ${IROOT}/zeromq.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  source $IROOT/zeromq.installed
-  return 0; }
+fw_installed zeromq && return 0
 
 
 ZMQ_VERSION="4.0.3"
 ZMQ_VERSION="4.0.3"