aboutsummaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-31 22:12:16 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-31 22:12:16 +1300
commit5d116c86aea19670147a7f0c0c95a18b5444a3a2 (patch)
treefcaa177930a8cb9a916e06b9f22c6ffef899992d /check
parent3fc8bcbef147098fd40ad99a83410d6a994d1579 (diff)
downloaddotfiles-5d116c86aea19670147a7f0c0c95a18b5444a3a2.tar.gz
Apply stable check and lint methods to games shell
This applies the same stable approach to testing the actual built games that are shebannged with #!/bin/sh as has been applied to the shell scripts in the `check-bin` and `lint-bin` targets. There are no GNU Bash games in these directories, so the latter block of code from the `bin` analogues to check or lint those is not needed. The same applies here; this is not as complete a checking or linting of the games directory as it could be; ideally we would check the sed(1) and awk(1) scripts too.
Diffstat (limited to 'check')
-rw-r--r--check/games.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/check/games.sh b/check/games.sh
index 79d53ed5..7d1c3694 100644
--- a/check/games.sh
+++ b/check/games.sh
@@ -1,4 +1,5 @@
+# POSIX sh
for game in games/*.sh ; do
- sh -n "$game" || exit
+ sh -n -- "${game%.sh}" || exit
done
-printf 'All shell scripts in games parsed successfully.\n'
+printf 'sh(1) games parsed successfully.\n'