aboutsummaryrefslogtreecommitdiff
path: root/lint/games
diff options
context:
space:
mode:
Diffstat (limited to 'lint/games')
-rwxr-xr-xlint/games12
1 files changed, 8 insertions, 4 deletions
diff --git a/lint/games b/lint/games
index 1802b3fd..6deac3b1 100755
--- a/lint/games
+++ b/lint/games
@@ -1,7 +1,11 @@
#!/bin/sh
for game in games/* ; do
- if sed 1q "$game" | grep -q -- 'sh$' ; then
- printf '%s\n' "$game"
- shellcheck -- "$game"
- fi
+ [ -e "$game" ] || continue
+ hb=$(sed 1q "$game") || exit
+ case $hb in
+ *sh)
+ printf '%s\n' "$game"
+ shellcheck -- "$game"
+ ;;
+ esac
done