summaryrefslogtreecommitdiff
path: root/Mk/Scripts
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2018-06-01 16:20:22 +0000
committerMathieu Arnold <mat@FreeBSD.org>2018-06-01 16:20:22 +0000
commitd605296d6e9553c3177a8b97a377a4807ef5752d (patch)
tree2c0aa1b6b241cc570a48af1aa192eaee132c2aef /Mk/Scripts
parentgraphics/leptonica: update to 1.76.0 (diff)
SC2145: Argument mixes string and array. Use * or separate argument.
The behavior when concatenating a string and array is rarely intended. The preceeding string is prefixed to the first array element, while the succeeding string is appended to the last one. The middle array elements are unaffected. For example, with the parameters foo,bar,baz, "--flag=$@" is equivalent to the three arguments "--flag=foo" "bar" "baz". PR: 227109 Submitted by: mat Sponsored by: Absolight
Diffstat (limited to 'Mk/Scripts')
-rw-r--r--Mk/Scripts/functions.sh12
-rw-r--r--Mk/Scripts/generate-symbols.sh2
-rw-r--r--Mk/Scripts/qa.sh8
3 files changed, 11 insertions, 11 deletions
diff --git a/Mk/Scripts/functions.sh b/Mk/Scripts/functions.sh
index 6a360abf21c7..d62d5436e284 100644
--- a/Mk/Scripts/functions.sh
+++ b/Mk/Scripts/functions.sh
@@ -74,9 +74,9 @@ parse_plist() {
@info\ *|@shell\ *|@xmlcatmgr\ *)
set -- $line
shift
- case "$@" in
- /*) echo "${comment}$@" ;;
- *) echo "${comment}${cwd}/$@" ;;
+ case "$*" in
+ /*) echo "${comment}$*" ;;
+ *) echo "${comment}${cwd}/$*" ;;
esac
;;
@sample\ *)
@@ -103,12 +103,12 @@ parse_plist() {
@fc\ *|@fcfontsdir\ *|@fontsdir\ *)
set -- $line
shift
- case "$@" in
+ case "$*" in
/*)
- echo >&3 "${comment}$@"
+ echo >&3 "${comment}$*"
;;
*)
- echo >&3 "${comment}${cwd}/$@"
+ echo >&3 "${comment}${cwd}/$*"
;;
esac
;;
diff --git a/Mk/Scripts/generate-symbols.sh b/Mk/Scripts/generate-symbols.sh
index cdad53635f93..6d490e86c999 100644
--- a/Mk/Scripts/generate-symbols.sh
+++ b/Mk/Scripts/generate-symbols.sh
@@ -3,7 +3,7 @@
# Maintainer: portmgr@FreeBSD.org
msg() {
- echo "====> $@"
+ echo "====> $*"
}
msg "Finding symbols"
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index 9ef94484a728..1ef6f359b2f4 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -13,15 +13,15 @@ LF=$(printf '\nX')
LF=${LF%X}
notice() {
- echo "Notice: $@" >&2
+ echo "Notice: $*" >&2
}
warn() {
- echo "Warning: $@" >&2
+ echo "Warning: $*" >&2
}
err() {
- echo "Error: $@" >&2
+ echo "Error: $*" >&2
}
list_stagedir_elfs() {
@@ -31,7 +31,7 @@ list_stagedir_elfs() {
shebangonefile() {
local f interp interparg badinterp rc
- f="$@"
+ f="$*"
rc=0
# whitelist some files