Last active
August 27, 2015 05:06
-
-
Save nandub/04f1f049a5e55476b642 to your computer and use it in GitHub Desktop.
[ARCHLINUX] md5 and sha1 sum PKGBUILD updater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#taken from https://bbs.archlinux.org/viewtopic.php?id=131666 by falconindy | |
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,} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment