aboutsummaryrefslogtreecommitdiff
path: root/shellcheck.sh
diff options
context:
space:
mode:
authorGuillermo Ramos2022-01-20 11:54:48 +0100
committerGuillermo Ramos2022-01-20 11:54:48 +0100
commite6ff299df50fe5db6037a0800144a22e4157b2c6 (patch)
tree434dab1058b20d0bc82f2b880b9a98d610b478e9 /shellcheck.sh
parentacf0af089501a0d1d167df73426f28d57081df96 (diff)
downloadcli-e6ff299df50fe5db6037a0800144a22e4157b2c6.tar.gz
shellcheck
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 {} \;