Browse Source

Clarify shebang behavior in bash installer scripts

Hamilton Turner 10 years ago
parent
commit
0306e2c299

+ 6 - 2
toolset/setup/linux/bash_functions.sh

@@ -73,8 +73,12 @@ fw_depends() {
     wd=$(pwd)
     relative_wd=\$FWROOT${wd#$FWROOT}
 
-    # Turn on bash tracing before sourcing installer files to 
-    # print commands before they run
+    # Find and run the installer.sh file for this dependency
+    # Turn on some bash options before sourcing: 
+    #   - (x) errtrace : Print commands before they are run
+    # Note: A shebang is just a comment when you source a script, 
+    #       so if you need to modify the default options use  
+    #       `set -e` instead of `#!/bin/bash -e`
     if [ -f $FWROOT/toolset/setup/linux/systools/${depend}.sh ]; then
       echo Installing system tool: $depend in $relative_wd
       set -x

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

@@ -1,11 +1,8 @@
-#!/bin/bash -ex
+#!/bin/bash 
 
 RETCODE=$(fw_exists /opt/ghc/7.8.3/bin/ghc)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
-lsb_release -a
-env
-
 export LANG=en_US.UTF-8
 
 sudo add-apt-repository -y ppa:hvr/ghc