summarylogtreecommitdiffstats
path: root/update.sh
diff options
context:
space:
mode:
authorJames Bunton2017-07-05 16:29:26 +1000
committerJames Bunton2017-07-05 16:29:26 +1000
commite5eaaee4c147eee602d29111a155f6f8fbc2c6d8 (patch)
tree6c230045d0bc1614f6f7ab1b4d07590a1c4a777a /update.sh
parent0735f9157ea72bb79ba5b57d5c9411f62162cbaa (diff)
downloadaur-e5eaaee4c147eee602d29111a155f6f8fbc2c6d8.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..49c239eeea84
--- /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 '^3\.16\.')"
+HASH="$(curl -sSf https://www.kernel.org/pub/linux/kernel/v3.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