summaryrefslogtreecommitdiff
path: root/bin/sbang
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-10-05 09:33:59 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-10-05 09:33:59 +0200
commit7a26c60dbd73e0d5c5c6ec1fce8087c889fd0f25 (patch)
treee37497aff3b3b24618677138efd68fde37b1916e /bin/sbang
parent47f6a6d3cfd1285fb5d8cd95a415c8a24045b330 (diff)
parentbff1656a1a842b4de217129cc8cba732a30928a7 (diff)
downloadspack-7a26c60dbd73e0d5c5c6ec1fce8087c889fd0f25.tar.gz
spack-7a26c60dbd73e0d5c5c6ec1fce8087c889fd0f25.tar.bz2
spack-7a26c60dbd73e0d5c5c6ec1fce8087c889fd0f25.tar.xz
spack-7a26c60dbd73e0d5c5c6ec1fce8087c889fd0f25.zip
Merge branch 'develop' of https://github.com/LLNL/spack into features/install_with_phases_rebase
Conflicts: lib/spack/spack/cmd/setup.py lib/spack/spack/package.py var/spack/repos/builtin/packages/gmp/package.py
Diffstat (limited to 'bin/sbang')
-rwxr-xr-xbin/sbang8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/sbang b/bin/sbang
index 1ea5f06592..e71074b330 100755
--- a/bin/sbang
+++ b/bin/sbang
@@ -111,8 +111,12 @@ while read line && ((lines < 2)) ; do
done < "$script"
# Invoke any interpreter found, or raise an error if none was found.
-if [ -n "$interpreter" ]; then
- exec $interpreter "$@"
+if [[ -n "$interpreter" ]]; then
+ if [[ "${interpreter##*/}" = "perl" ]]; then
+ exec $interpreter -x "$@"
+ else
+ exec $interpreter "$@"
+ fi
else
echo "error: sbang found no interpreter in $script"
exit 1