Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2015 11:37:14 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r388526 - head/Mk/Scripts
Message-ID:  <201506041137.t54BbEtu018379@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Thu Jun  4 11:37:13 2015
New Revision: 388526
URL: https://svnweb.freebsd.org/changeset/ports/388526

Log:
  - 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)

Modified:
  head/Mk/Scripts/qa.sh

Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh	Thu Jun  4 11:29:47 2015	(r388525)
+++ head/Mk/Scripts/qa.sh	Thu Jun  4 11:37:13 2015	(r388526)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506041137.t54BbEtu018379>