[packages/rpm-build-tools] Add awk to shebangs that need fixing
baggins
baggins at pld-linux.org
Sun Oct 3 22:42:46 CEST 2021
commit 8829b228337993404ced06e794c0766ef5e14f3e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Oct 3 22:42:13 2021 +0200
Add awk to shebangs that need fixing
check-shebang.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/check-shebang.py b/check-shebang.py
index 90075bc..0ea9ca0 100755
--- a/check-shebang.py
+++ b/check-shebang.py
@@ -20,6 +20,7 @@ rep = {
'perl': [],
'ruby': [],
'bash': [],
+ 'awk': [],
}
skip_files = [".h", ".c", ".cc", ".gif", ".png", ".jpg", ".ko", ".gz", ".o"]
@@ -74,6 +75,8 @@ for root, dirs, files in os.walk(args.sourcedir):
rep['ruby'].append(fpath)
elif re.compile(r'^#!\s*/usr/bin/env\s+bash\s').match(shebang):
rep['bash'].append(fpath)
+ elif re.compile(r'^#!\s*/usr/bin/env\s+awk\s').match(shebang):
+ rep['awk'].append(fpath)
except FileNotFoundError:
pass
@@ -102,3 +105,4 @@ gf("%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\\1,'
gf("%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\\1,' \\", rep['perl'])
gf("%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+ruby(\s|$),#!%{__ruby}\\1,' \\", rep['ruby'])
gf("%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\\1,' \\", rep['bash'])
+gf("%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+awk(\s|$),#!/bin/awk\\1,' \\", rep['awk'])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/8829b228337993404ced06e794c0766ef5e14f3e
More information about the pld-cvs-commit
mailing list