Skip to content

Commit 178f546

Browse files
committed
added bash as an option in the fix_*_shebang_for
1 parent 184219a commit 178f546

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

easybuild/framework/easyblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ def package_step(self):
24662466

24672467
def fix_shebang(self):
24682468
"""Fix shebang lines for specified files."""
2469-
for lang in ['perl', 'python']:
2469+
for lang in ['bash', 'perl', 'python']:
24702470
shebang_regex = re.compile(r'^#![ ]*.*[/ ]%s.*' % lang)
24712471
fix_shebang_for = self.cfg['fix_%s_shebang_for' % lang]
24722472
if fix_shebang_for:

easybuild/framework/easyconfig/default.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@
9595
'easybuild_version': [None, "EasyBuild-version this spec-file was written for", BUILD],
9696
'enhance_sanity_check': [False, "Indicate that additional sanity check commands & paths should enhance "
9797
"the existin sanity check, not replace it", BUILD],
98+
'fix_bash_shebang_for': [None, "List of files for which Bash shebang should be fixed "
99+
"to '#!/usr/bin/env bash' (glob patterns supported)", BUILD],
98100
'fix_perl_shebang_for': [None, "List of files for which Perl shebang should be fixed "
99101
"to '#!/usr/bin/env perl' (glob patterns supported)", BUILD],
100102
'fix_python_shebang_for': [None, "List of files for which Python shebang should be fixed "

0 commit comments

Comments
 (0)