blob: 8dec15383eea0de8c1de6bd667a29c83b1bc83c7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
for game in games/* ; do
[ -f "$game" ] || continue
hb=$(sed 1q "$game") || exit
case $hb in
*bash)
bash -n "$game" || exit
;;
*sh)
sh -n "$game" || exit
;;
*'sed -f')
sed -f "$game" /dev/null >/dev/null || exit
;;
*'awk -f')
# Not sure how to test these yet
;;
*)
printf 2>&1 'Unknown hashbang for %s\n' "$game"
exit 1
;;
esac
done
printf 'All shell scripts in games parsed successfully.\n'
|