From a179e2b48b0c6f6f57421d0f99b49ab6f4970dd5 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 31 Oct 2017 22:41:21 +1300 Subject: Add option terminators to some stray `set` calls Adding the option terminator "--" directly after the `set` call ensures that all following arguments will be interpreted as new arguments for the list. This is probably not strictly applicable here, because the paths that will be stacked up don't start with dashes by definition, but it's likely good practice. --- lint/bin.sh | 4 ++-- lint/games.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lint') diff --git a/lint/bin.sh b/lint/bin.sh index 05a0deba..d27494dd 100644 --- a/lint/bin.sh +++ b/lint/bin.sh @@ -1,7 +1,7 @@ # POSIX sh set -- for bin in bin/*.sh ; do - set "$@" "${bin%.sh}" + set -- "$@" "${bin%.sh}" done shellcheck -e SC1090 -- "$@" || exit printf 'POSIX sh binscripts linted successfully.\n' @@ -10,7 +10,7 @@ printf 'POSIX sh binscripts linted successfully.\n' if command -v bash >/dev/null 2>&1 ; then set -- for bin in bin/*.bash ; do - set "$@" "${bin%.bash}" + set -- "$@" "${bin%.bash}" done shellcheck -e SC1090 -- "$@" || exit printf 'GNU Bash binscripts linted successfully.\n' diff --git a/lint/games.sh b/lint/games.sh index fa2c7a97..240961af 100644 --- a/lint/games.sh +++ b/lint/games.sh @@ -1,7 +1,7 @@ # POSIX sh set -- for game in games/*.sh ; do - set "$@" "${game%.sh}" + set -- "$@" "${game%.sh}" done shellcheck -e SC1090 -- "$@" || exit printf 'sh(1) games linted successfully.\n' -- cgit v1.2.3