laptop-dots/Scripts/hashes
2023-03-07 21:38:29 -08:00

15 lines
230 B
Bash
Executable File

#!/bin/bash
awk -v newsums="$(makepkg -g)" '
BEGIN {
if (!newsums) exit 1
}
/^[[:blank:]]*(md|sha)[[:digit:]]+sums=/,/\)[[:blank:]]*$/ {
if (!i) print newsums; i++
next
}
1
' PKGBUILD > PKGBUILD.new && mv PKGBUILD{.new,}