usage
This commit is contained in:
parent
1f8d301103
commit
1bdfb798ea
|
@ -2,11 +2,17 @@
|
|||
|
||||
set -e
|
||||
|
||||
# check usage
|
||||
if ! test -n "$1"; then
|
||||
printf "Usage: %s [path...]\n" "$0" 1>&2
|
||||
exit 64 # sysexits(3) EX_USAGE
|
||||
fi
|
||||
|
||||
# check if we have rg(1)
|
||||
if ! command -v rg >/dev/null 2>&1; then
|
||||
printf "%s: Missing dependency: rg(1)\n" "$0" 1>&2
|
||||
exit 69 # sysexits(3) EX_UNAVAILABLE
|
||||
else
|
||||
rg --multiline --files-without-match --glob '*.rs' --pcre2 \
|
||||
rg --multiline --files-without-match --glob "$1" --pcre2 \
|
||||
'(?<!\n)((//)|(#)) Copyright \(c\) \d+ [A-z, ]+\n((//)|(#)) SPDX-License-Identifier: .*\n'
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue