Skip to content

Instantly share code, notes, and snippets.

@rshipp
Created June 25, 2014 01:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rshipp/f01c4bab9a75e0b2875f to your computer and use it in GitHub Desktop.
Save rshipp/f01c4bab9a75e0b2875f to your computer and use it in GitHub Desktop.
A terrible one-liner for in-place updating of PKGBUILD checksums.
oldsums=$(sed -n '/^.*sums=(.*/,/.*)/p' PKGBUILD); newsums=$(makepkg -g); sed -i "/^.*sums=(.*/,/.*)$/y/${oldsums/$'\n'/\\n}/${newsums/$'\n'/\\n}/" PKGBUILD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment