# Every tracked file (not symlink) that starts with a bash or sh shebang (\043 is "#", which # make would otherwise read as the start of a comment) SCRIPTS := $(shell git ls-files -s | awk '$$1 != 120000 { print $$4 }' | xargs awk 'FNR == 1 && /^#!.*[\/ ](ba)?sh/ { print FILENAME }') .PHONY: check lint test check: lint test lint: shellcheck --severity=warning $(SCRIPTS) test: bats tests