summaryrefslogtreecommitdiff
path: root/Mk/Scripts/functions.sh
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/functions.sh
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/functions.sh')
-rw-r--r--Mk/Scripts/functions.sh12
1 files changed, 6 insertions, 6 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
;;