vsed: refactor digest variables' name
We don't specify any specific digest function in this function, and the old variables' name doesn't reflect the fact that they're a pair of old and new digest built by the same hash function.
This commit is contained in:
parent
35242fdff2
commit
c384f85d2b
|
@ -46,16 +46,16 @@ vsed() {
|
|||
|
||||
for rx in "${regexes[@]}"; do
|
||||
for f in "${files[@]}"; do
|
||||
shasums="$($XBPS_DIGEST_CMD "$f")"
|
||||
olddigest="$($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="$($XBPS_DIGEST_CMD "$f")"
|
||||
newdigest="$($XBPS_DIGEST_CMD "$f")"
|
||||
|
||||
if [ "$shasums" = "${sha256sum%% *}" ]; then
|
||||
if [ "$olddigest" = "${newdigest%% *}" ]; then
|
||||
msg_warn "$pkgver: vsed: regex \"$rx\" didn't change file \"$f\"\n"
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue
Block a user