aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-31 22:41:21 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-31 22:41:21 +1300
commita179e2b48b0c6f6f57421d0f99b49ab6f4970dd5 (patch)
tree63c16d520ff455f50d40cb151a7ea0887cfa51c2
parentApply revisions to `check-zsh` target as well (diff)
downloaddotfiles-a179e2b48b0c6f6f57421d0f99b49ab6f4970dd5.tar.gz
dotfiles-a179e2b48b0c6f6f57421d0f99b49ab6f4970dd5.zip
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.
-rw-r--r--lint/bin.sh4
-rw-r--r--lint/games.sh2
2 files changed, 3 insertions, 3 deletions
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'