summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-11-04 15:39:41 +0100
committerXZS2016-11-04 15:46:04 +0100
commitbc0d37e1b2236c8907bbbcd1e0384156fa16df35 (patch)
tree12c0e38e370250330540e218102e8e3b426376a6
parente5c8c29498bfafd6323cc988fd5db5ab9555bed6 (diff)
downloadaur-bc0d37e1b2236c8907bbbcd1e0384156fa16df35.tar.gz
provide updpkgsums alternative
As one of the checksums is now hidden in a function on purpose, the standard updpkgsums would destroy the PKGBUILD. Here is an alternative that keeps the structure intact. It tells the both sums apart by indent.
-rwxr-xr-xupdpkgsums.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/updpkgsums.sh b/updpkgsums.sh
new file mode 100755
index 000000000000..c9e694e97fda
--- /dev/null
+++ b/updpkgsums.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+makepkg --nobuild --skipinteg
+
+sum() {
+ openssl dgst -sha256 "$1" | sed 's/^.*= //'
+}
+
+replace() {
+ echo "s/^$2sha256sums=('.*')/$2sha256sums=('$(sum "$1")')/"
+}
+
+sed -i "$(replace meta);$(replace Dark-Aurora.tar.xz ' ')" PKGBUILD