diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-14 17:35:55 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-14 17:35:55 +1200 |
commit | ed25ec0e3108ec930fb3be24a58a0fa62fe9cacc (patch) | |
tree | 08d55b0b84b2c4ee66c465c9190ada584a7048d0 /Makefile | |
parent | Add per-file editing and completion for td(1) (diff) | |
download | dotfiles-ed25ec0e3108ec930fb3be24a58a0fa62fe9cacc.tar.gz dotfiles-ed25ec0e3108ec930fb3be24a58a0fa62fe9cacc.zip |
Use more accurate recipe for bash/sh detection
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 -- {} \; |