laptop-dots/Scripts/hashes

15 lines
230 B
Plaintext
Raw Permalink Normal View History

2023-03-08 05:38:29 +00:00
#!/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,}