Created
May 26, 2017 19:44
-
-
Save edupo/3f44d4e3f5250f178c06593dcac55044 to your computer and use it in GitHub Desktop.
Shell script test Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/make | |
# exclude switches are useful for git and vim users. Other may apply here. | |
test: shellcheck.check | |
grep -rIl '^#![[:blank:]]*/bin/\(bash\|sh\|zsh\)' \ | |
--exclude-dir=.git --exclude=*.sw? \ | |
| xargs shellcheck | |
# .check targets just tests for a command to be available on your PATH. | |
.PHONY: %.check | |
%.check: | |
@which $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment