summaryrefslogtreecommitdiff
path: root/Mk/Scripts/qa.sh
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2015-06-04 11:37:13 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2015-06-04 11:37:13 +0000
commit103d62fa7ae2daead25d97a45aa3419542e9f657 (patch)
tree979b1e4f1cd4b403aa03350b808e6e266ef8bdf5 /Mk/Scripts/qa.sh
parent- Disable precompiled headers to fix build with old gcc on -current kernel (diff)
- Add blacklist of files which are not intended to be executed to shebang test
- Sort shebang list Differential Revision: D2670 Submitted by: amdmi3 Approved by: portmgr (bapt)
Notes
Notes: svn path=/head/; revision=388526
Diffstat (limited to 'Mk/Scripts/qa.sh')
-rw-r--r--Mk/Scripts/qa.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index d1c98093f1d9..0a4c96ebba29 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -23,19 +23,27 @@ shebangonefile() {
f="$@"
rc=0
+
+ # blacklist of files which are not intended to be runnable
+ case "${f##*/}" in
+ *.pm|*.pod|*.txt)
+ return 0
+ ;;
+ esac
+
interp=$(sed -n -e '1s/^#![[:space:]]*\([^[:space:]]*\).*/\1/p;2q' "$f")
case "$interp" in
"") ;;
- /usr/bin/env) ;;
${LINUXBASE}/*) ;;
${LOCALBASE}/*) ;;
${PREFIX}/*) ;;
- /usr/bin/awk) ;;
- /usr/bin/sed) ;;
- /usr/bin/nawk) ;;
/bin/csh) ;;
/bin/sh) ;;
/bin/tcsh) ;;
+ /usr/bin/awk) ;;
+ /usr/bin/env) ;;
+ /usr/bin/nawk) ;;
+ /usr/bin/sed) ;;
*)
err "'${interp}' is an invalid shebang you need USES=shebangfix for '${f#${STAGEDIR}${PREFIX}/}'"
rc=1