From 82d75833d1e864a4e79248a0b275329e25094048 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 2 Aug 2016 17:08:20 +1200 Subject: Spruce up lint-bin and lint-games scripts --- lint/games | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lint/games') 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 -- cgit v1.2.3