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 | |
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')
-rwxr-xr-x | lint/bin | 14 | ||||
-rwxr-xr-x | lint/games | 12 |
2 files changed, 17 insertions, 9 deletions
@@ -1,7 +1,11 @@ #!/bin/sh -for bin in bin/* ; do - if sed 1q "$bin" | grep -q -- 'sh$' ; then - printf '%s\n' "$bin" - shellcheck -- "$bin" - fi +for bin in games/* ; do + [ -e "$bin" ] || continue + hb=$(sed 1q "$bin") || exit + case $hb in + *sh) + printf '%s\n' "$bin" + shellcheck -- "$bin" + ;; + esac done @@ -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 |