vsed.sh: use XBPS_DIGEST_CMD instead of sha256sum

This commit is contained in:
maxice8 2019-04-13 15:09:54 -03:00 committed by maxice8
parent 68733fc673
commit df5886d7d7
1 changed files with 2 additions and 2 deletions

View File

@ -46,14 +46,14 @@ vsed() {
for rx in "${regexes[@]}"; do
for f in "${files[@]}"; do
shasums="$(sha256sum "$f" 2>/dev/null | awk '{print $1}')"
shasums="$($XBPS_DIGEST_CMD "$f")"
sed -i "$f" -e "$rx" || {
msg_red "$pkgver: vsed: sed call failed with regex \"$rx\" on file \"$f\"\n"
return 1
}
sha256sum="$(sha256sum "$f" 2>/dev/null)"
sha256sum="$($XBPS_DIGEST_CMD "$f")"
if [ "$shasums" = "${sha256sum%% *}" ]; then
msg_warn "$pkgver: vsed: regex \"$rx\" didn't change file \"$f\"\n"