diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2015-06-04 19:37:13 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2015-06-04 19:37:13 +0800 |
commit | b51b22cd542dff1a07420c8d1bacd97942a834f6 (patch) | |
tree | 979b1e4f1cd4b403aa03350b808e6e266ef8bdf5 | |
parent | 3e0dc613d3acad398b2034ffe84806b944a3692d (diff) | |
download | freebsd-ports-gnome-b51b22cd542dff1a07420c8d1bacd97942a834f6.tar.gz freebsd-ports-gnome-b51b22cd542dff1a07420c8d1bacd97942a834f6.tar.zst freebsd-ports-gnome-b51b22cd542dff1a07420c8d1bacd97942a834f6.zip |
- 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)
-rw-r--r-- | Mk/Scripts/qa.sh | 16 |
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 |