aboutsummaryrefslogtreecommitdiff
path: root/lint/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-02 17:08:20 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-02 17:08:20 +1200
commit82d75833d1e864a4e79248a0b275329e25094048 (patch)
tree55583357ab480a1fda1c2fcbbdd9cce075693e60 /lint/bin
parentRemove leading blank line (diff)
downloaddotfiles-82d75833d1e864a4e79248a0b275329e25094048.tar.gz
dotfiles-82d75833d1e864a4e79248a0b275329e25094048.zip
Spruce up lint-bin and lint-games scripts
Diffstat (limited to 'lint/bin')
-rwxr-xr-xlint/bin14
1 files changed, 9 insertions, 5 deletions
diff --git a/lint/bin b/lint/bin
index 1f7d9c66..c5729fdb 100755
--- a/lint/bin
+++ b/lint/bin
@@ -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