summarylogtreecommitdiffstats
path: root/update.sh
diff options
context:
space:
mode:
authorJames Bunton2017-06-30 01:31:27 +1000
committerJames Bunton2017-06-30 01:36:54 +1000
commit59633aeb176167be17b2c044e8ae365169a1e9bc (patch)
tree8d3a27176341fab04b6e73f669fb0102fcf271d6 /update.sh
parent88033ef12554fecaab14cac9066ea30b5f8e2e29 (diff)
downloadaur-59633aeb176167be17b2c044e8ae365169a1e9bc.tar.gz
Added update.sh utility
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/update.sh b/update.sh
new file mode 100755
index 000000000000..495102bb84bc
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -eu
+
+cd "$(dirname "$0")"
+
+VERSION="$(curl -sSf https://www.kernel.org/releases.json | jq -r '.releases[].version' | grep '^4\.4\.')"
+HASH="$(curl -sSf https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc | grep "patch-${VERSION}.xz" | cut -d' ' -f1)"
+
+sed -i "s/pkgver=.*/pkgver=${VERSION}/" PKGBUILD
+sed -i "s/.* # patch$/ '$HASH' # patch/" PKGBUILD
+mksrcinfo