cfg/.config/sanity.d/placeholder-in-license.sh
Knut Ahlers b7e83d8269
Add sanity check framework
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2020-09-06 13:36:10 +02:00

17 lines
340 B
Bash

function sanity_year_placeholder_in_license() {
report debug "Check for [year] placeholder in LICENSE file"
[[ -f LICENSE ]] || {
report warn "No LICENSE file found"
return 0
}
grep '\[year\]' LICENSE || {
report success "No placeholder found"
return 0
}
report error "LICENSE file contains [year] placeholder"
return 1
}