aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-06-14 17:35:55 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-06-14 17:35:55 +1200
commited25ec0e3108ec930fb3be24a58a0fa62fe9cacc (patch)
tree08d55b0b84b2c4ee66c465c9190ada584a7048d0 /Makefile
parentAdd per-file editing and completion for td(1) (diff)
downloaddotfiles-ed25ec0e3108ec930fb3be24a58a0fa62fe9cacc.tar.gz
dotfiles-ed25ec0e3108ec930fb3be24a58a0fa62fe9cacc.zip
Use more accurate recipe for bash/sh detection
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 47518d9b..e38a9963 100644
--- a/Makefile
+++ b/Makefile
@@ -278,9 +278,9 @@ test-bash :
test-bin :
@for bin in bin/* ; do \
- if sed 1q "$$bin" | grep -q bash ; then \
+ if sed 1q "$$bin" | grep -q 'bash$$' ; then \
bash -n "$$bin" || exit 1 ; \
- elif sed 1q "$$bin" | grep -q sh ; then \
+ elif sed 1q "$$bin" | grep -q 'sh$$' ; then \
sh -n "$$bin" || exit 1 ; \
fi ; \
done
@@ -301,7 +301,12 @@ lint-bash :
find bash -type f -print -exec shellcheck -- {} \;
lint-bin :
- find bin -type f -print -exec shellcheck -- {} \;
+ @for bin in bin/* ; do \
+ if sed 1q "$$bin" | grep -q -- 'sh$$' ; then \
+ printf '%s\n' "$$bin" ; \
+ shellcheck -- "$$bin" ; \
+ fi ; \
+ done
lint-urxvt:
find urxvt/ext -type f -print -exec perlcritic --brutal -- {} \;