Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2016 16:16:43 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r406594 - head/Mk/Scripts
Message-ID:  <201601181616.u0IGGhqo017043@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Mon Jan 18 16:16:43 2016
New Revision: 406594
URL: https://svnweb.freebsd.org/changeset/ports/406594

Log:
  Be consistent and always enclose shell variables inside braces.
  
  Sponsored by:	Absolight

Modified:
  head/Mk/Scripts/qa.sh

Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh	Mon Jan 18 16:16:39 2016	(r406593)
+++ head/Mk/Scripts/qa.sh	Mon Jan 18 16:16:43 2016	(r406594)
@@ -31,8 +31,8 @@ shebangonefile() {
 		;;
 	esac
 
-	interp=$(sed -n -e '1s/^#![[:space:]]*\([^[:space:]]*\).*/\1/p;2q' "$f")
-	case "$interp" in
+	interp=$(sed -n -e '1s/^#![[:space:]]*\([^[:space:]]*\).*/\1/p;2q' "${f}")
+	case "${interp}" in
 	"") ;;
 	${LINUXBASE}/*) ;;
 	${LOCALBASE}/*) ;;
@@ -245,7 +245,7 @@ libperl() {
 			# No results presents a blank line from heredoc.
 			[ -z "${f}" ] && continue
 			files=$((files+1))
-			found=`readelf -d $f | awk "BEGIN {libperl=1; rpath=10; runpath=100}
+			found=`readelf -d ${f} | awk "BEGIN {libperl=1; rpath=10; runpath=100}
 				/NEEDED.*${LIBPERL}/  { libperl = 0 }
 				/RPATH.*perl.*CORE/   { rpath   = 0 }
 				/RUNPATH.*perl.*CORE/ { runpath = 0 }
@@ -274,7 +274,7 @@ libperl() {
 		$(find ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL} -name '*.so')
 		EOT
 
-		if [ $files -gt 0 -a $has_some_libperl_so -eq 0 ]; then
+		if [ ${files} -gt 0 -a ${has_some_libperl_so} -eq 0 ]; then
 			err "None of the .so in ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL} are linked with ${LIBPERL}, see above for the full list."
 			return 1
 		else
@@ -318,4 +318,4 @@ for check in ${checks}; do
 	${check} || ret=1
 done
 
-exit $ret
+exit ${ret}



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