summarylogtreecommitdiffstats
path: root/update.sh
diff options
context:
space:
mode:
authorAlexandre Bury2022-08-22 11:32:55 -0400
committerAlexandre Bury2022-08-22 11:32:55 -0400
commit3a6302c09fbfc7b8b37cb93fc2639bd51cdfb60d (patch)
tree204544964c5079909c4f6a084a536a3a825d2093 /update.sh
parent3f1c6dc48fd778263376d04c0c484726e1bb1177 (diff)
downloadaur-3a6302c09fbfc7b8b37cb93fc2639bd51cdfb60d.tar.gz
Include error message
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/update.sh b/update.sh
index 04fd2d9a22eb..4b04e3c62ae3 100755
--- a/update.sh
+++ b/update.sh
@@ -25,6 +25,16 @@ DOWNLOAD_URL=$(jq -r <<<$RELEASES --arg last $LAST '
.[$last][] | select(.packagetype == "sdist").url
')
+if [ -z "$DOWNLOAD_URL" ]; then
+ echo "Could not get a release URL from:
+$(
+ jq -r <<<$RELEASES --arg last $LAST '
+ .[$last][] | {packagetype, url}
+ '
+)" >&2
+ exit 1
+fi
+
SUM=$(curl -sL $DOWNLOAD_URL | $HASH - | cut -d' ' -f1)
sed -i 's/.*sums=.*$/'$HASH_NAME'=("'$SUM'")/' PKGBUILD