diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-22 19:17:02 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-22 19:17:02 -0600 |
commit | 185c3329145959433b8b805de5f114b66b8fcaee (patch) | |
tree | 048ec8b781f1d3b45d29a1d862d724908d0d9785 /build-aux/lint-unknown | |
parent | 2774e918b6ced670f80036532052189d568e5c5c (diff) | |
parent | 2300ddae5f98180311419413d98fbc8384470665 (diff) |
Merge branch 'lukeshu/qa'
Diffstat (limited to 'build-aux/lint-unknown')
-rwxr-xr-x | build-aux/lint-unknown | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/build-aux/lint-unknown b/build-aux/lint-unknown index 3c2e91b..dda9541 100755 --- a/build-aux/lint-unknown +++ b/build-aux/lint-unknown @@ -7,4 +7,18 @@ RED=$(tput setaf 1) RESET=$(tput sgr0) -printf "${RED}%s${RESET}: cannot lint unknown file type\n" "$@" >&2 +err() { + printf "${RED}%s${RESET}: %s\n" "$1" "$2" >&2 + r=1 +} + +r=0 +for filename in "$@"; do + if ! { [ -f "$filename" ] && ! [ -h "$filename" ]; }; then + # Ignore non-files + continue + fi + + err "$filename" 'cannot lint unknown file type' +done +exit $r |