diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sbang | 11 | ||||
-rwxr-xr-x | bin/spack | 3 |
2 files changed, 14 insertions, 0 deletions
@@ -79,6 +79,15 @@ # Obviously, for this to work, `sbang` needs to have a short enough # path that *it* will run without hitting OS limits. # +# For Lua, scripts the second line can't start with #!, as # is not +# the comment character in lua (even though lua ignores #! on the +# *first* line of a script). So, instrument a lua script like this, +# using -- instead of # on the second line: +# +# 1 #!/bin/bash /path/to/sbang +# 2 --!/long/path/to/lua with arguments +# 3 +# 4 print "success!" # # How it works # ----------------------------- @@ -95,6 +104,8 @@ lines=0 while read line && ((lines < 2)) ; do if [[ "$line" = '#!'* ]]; then interpreter="${line#\#!}" + elif [[ "$line" = '--!'*lua* ]]; then + interpreter="${line#--!}" fi lines=$((lines+1)) done < "$script" @@ -138,6 +138,9 @@ def main(): import spack.util.debug as debug debug.register_interrupt_handler() + from spack.yaml_version_check import check_yaml_versions + check_yaml_versions() + spack.spack_working_dir = working_dir if args.mock: from spack.repository import RepoPath |