xbps-src: add strict mode

This commit is contained in:
Michal Vasilek 2022-03-09 22:12:40 +01:00 committed by Echo
parent 4fec3d6697
commit 769ea65a5e
3 changed files with 15 additions and 5 deletions

View file

@ -57,8 +57,13 @@ vsed() {
newdigest="$($XBPS_DIGEST_CMD "$f")"
newdigest="${newdigest%% *}"
msgfunc=msg_warn
if [ -n "$XBPS_STRICT" ]; then
msgfunc=msg_error
fi
if [ "$olddigest" = "$newdigest" ]; then
msg_warn "$pkgver: vsed: regex \"$rx\" didn't change file \"$f\"\n"
$msgfunc "$pkgver: vsed: regex \"$rx\" didn't change file \"$f\"\n"
fi
olddigest="${newdigest}"
done