diff options
author | Alexandre Bury | 2022-08-22 11:32:55 -0400 |
---|---|---|
committer | Alexandre Bury | 2022-08-22 11:32:55 -0400 |
commit | 3a6302c09fbfc7b8b37cb93fc2639bd51cdfb60d (patch) | |
tree | 204544964c5079909c4f6a084a536a3a825d2093 /update.sh | |
parent | 3f1c6dc48fd778263376d04c0c484726e1bb1177 (diff) | |
download | aur-3a6302c09fbfc7b8b37cb93fc2639bd51cdfb60d.tar.gz |
Include error message
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 10 |
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 |