aboutsummaryrefslogtreecommitdiff
path: root/shellcheck.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shellcheck.sh')
-rwxr-xr-xshellcheck.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/shellcheck.sh b/shellcheck.sh
new file mode 100755
index 0000000..7c8dc6e
--- /dev/null
+++ b/shellcheck.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+find "$(dirname "$0")" -maxdepth 1 -type f -executable -exec \
+ sh -c '
+if head -n1 "$1" | egrep -q "sh$"; then
+ echo "====== CHECKING $1 ======";
+ shellcheck "$1";
+fi
+ ' shell {} \;