diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-02 17:08:20 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-02 17:08:20 +1200 |
commit | 82d75833d1e864a4e79248a0b275329e25094048 (patch) | |
tree | 55583357ab480a1fda1c2fcbbdd9cce075693e60 /lint/games | |
parent | Remove leading blank line (diff) | |
download | dotfiles-82d75833d1e864a4e79248a0b275329e25094048.tar.gz dotfiles-82d75833d1e864a4e79248a0b275329e25094048.zip |
Spruce up lint-bin and lint-games scripts
Diffstat (limited to 'lint/games')
-rwxr-xr-x | lint/games | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 |