Skip to content

Instantly share code, notes, and snippets.

@nandub
Last active August 27, 2015 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nandub/04f1f049a5e55476b642 to your computer and use it in GitHub Desktop.
Save nandub/04f1f049a5e55476b642 to your computer and use it in GitHub Desktop.
[ARCHLINUX] md5 and sha1 sum PKGBUILD updater
#!/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