diff options
author | Thiago Almeida | 2021-03-12 00:08:32 +0100 |
---|---|---|
committer | Thiago Almeida | 2021-03-12 00:08:32 +0100 |
commit | 3f0f5230f87cb644e0b1578ce7dd77bba800dd50 (patch) | |
tree | 14f56288161cbefe067d34c6ddd253440719db57 /update.sh | |
download | aur-3f0f5230f87cb644e0b1578ce7dd77bba800dd50.tar.gz |
Initial commit
Diffstat (limited to 'update.sh')
-rw-r--r-- | update.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/update.sh b/update.sh new file mode 100644 index 000000000000..7e09cb841bf4 --- /dev/null +++ b/update.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -x + +set -eou pipefail + + +http https://api.github.com/repos/gruntwork-io/cloud-nuke/releases/latest \ + "Accept: application/vnd.github.v3+json" | + jq -r '.assets[] | select(.name | test("^(SHA256SUMS|cloud-nuke.*_linux_(amd64|386))$")) | .browser_download_url' | + xargs -n 1 -P 3 wget + +sha256sum --ignore-missing --status -c SHA256SUMS + +X86_64_SHA=$(awk '/cloud-nuke.*_linux_amd64$/ {print $1}' SHA256SUMS) + +I386_SHA=$(awk '/cloud-nuke.*_linux_386$/ {print $1}' SHA256SUMS) + +sed -i -r 's/(sha256sums_x86_64=)\([A-Fa-f0-9]*\)/\1\('"$X86_64_SHA"'\)/g' PKGBUILD + +sed -i -r 's/(sha256sums_i386=)\([A-Fa-f0-9]*\)/\1\('"$I386_SHA"'\)/g' PKGBUILD + +makepkg --printsrcinfo >.SRCINFO |