diff options
Diffstat (limited to 'lib/spack/spack/hooks/sbang.py')
-rw-r--r-- | lib/spack/spack/hooks/sbang.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py index 324d5d4fbb..24d84db8af 100644 --- a/lib/spack/spack/hooks/sbang.py +++ b/lib/spack/spack/hooks/sbang.py @@ -64,6 +64,10 @@ def filter_shebang(path): if re.search(r'^#!(/[^/\n]*)*lua\b', original): original = re.sub(r'^#', '--', original) + # Use <?php #! instead of #! on second line for php. + if re.search(r'^#!(/[^/\n]*)*php\b', original): + original = re.sub(r'^#', '<?php #', original) + ' ?>' + # Use //! instead of #! on second line for node.js. if re.search(r'^#!(/[^/\n]*)*node\b', original): original = re.sub(r'^#', '//', original) |