aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile5
-rwxr-xr-xbuild-aux/assert-shellcheck.sh6
2 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e9537b2..61f4072 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,11 @@ uninstall:
check:
sh tests/all.sh
+ if [ -d .git ]; then \
+ echo 'Assuming Git repository, running development checks.'; \
+ sh build-aux/assert-shellcheck.sh; \
+ fi
+
dist:
if git show $(VERSION) 1>/dev/null 2>/dev/null; then \
echo 'Version $(VERSION) already exists.'; \
diff --git a/build-aux/assert-shellcheck.sh b/build-aux/assert-shellcheck.sh
new file mode 100755
index 0000000..334a875
--- /dev/null
+++ b/build-aux/assert-shellcheck.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -eux
+
+git ls-files -z | \
+ xargs -0 awk 'FNR==1 && /^#!\/bin\/sh$/ { print FILENAME }' | \
+ xargs shellcheck