summaryrefslogtreecommitdiff
path: root/bin/sbang
diff options
context:
space:
mode:
authorhealther <healther@users.noreply.github.com>2017-08-18 20:57:52 +0200
committerscheibelp <scheibel1@llnl.gov>2017-08-18 11:57:52 -0700
commitd6d2dff324347dc7dab1d453ef17378c752b8a78 (patch)
tree4bd05bb6fae77f3737164a57b365256a784c0c0c /bin/sbang
parent6d155833c5a9f6c55e58d56e4aec09eb32fe1839 (diff)
downloadspack-d6d2dff324347dc7dab1d453ef17378c752b8a78.tar.gz
spack-d6d2dff324347dc7dab1d453ef17378c752b8a78.tar.bz2
spack-d6d2dff324347dc7dab1d453ef17378c752b8a78.tar.xz
spack-d6d2dff324347dc7dab1d453ef17378c752b8a78.zip
sbang support: add node-js and fix lua
This adds sbang hook support for node-js and fixes the sbang filter for lua (the character class exclusion was swallowing newlines and reporting a false positive if lua was mentioned anywhere in the file).
Diffstat (limited to 'bin/sbang')
-rwxr-xr-xbin/sbang2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sbang b/bin/sbang
index 0b883a5feb..ce4df4327c 100755
--- a/bin/sbang
+++ b/bin/sbang
@@ -104,6 +104,8 @@ lines=0
while read line && ((lines < 2)) ; do
if [[ "$line" = '#!'* ]]; then
interpreter="${line#\#!}"
+ elif [[ "$line" = '//!'*node* ]]; then
+ interpreter="${line#//!}"
elif [[ "$line" = '--!'*lua* ]]; then
interpreter="${line#--!}"
fi