return 1 on unsuccessful hash/available updates
Some checks failed
eden-license / license-header (pull_request) Failing after 24s

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-10-04 13:02:08 -04:00
parent 0aa38ddc4c
commit e58cd02b67
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
2 changed files with 18 additions and 4 deletions

View file

@ -9,6 +9,8 @@
# shellcheck disable=SC1091
. tools/cpm/common.sh
RETURN=0
for PACKAGE in "$@"
do
export PACKAGE
@ -30,12 +32,15 @@ do
ACTUAL=$(tools/cpm/url-hash.sh "$DOWNLOAD")
# shellcheck disable=SC2028
[ "$ACTUAL" != "$HASH" ] && echo "-- * Expected $HASH" && echo "-- * Got $ACTUAL"
[ "$ACTUAL" != "$HASH" ] && echo "-- * Expected $HASH" && echo "-- * Got $ACTUAL" && [ "$UPDATE" != "true" ] && RETURN=1
if [ "$UPDATE" = "true" ] && [ "$ACTUAL" != "$HASH" ]; then
# shellcheck disable=SC2034
NEW_JSON=$(echo "$JSON" | jq ".hash = \"$ACTUAL\"")
export NEW_JSON
tools/cpm/replace.sh
fi
done
done
exit $RETURN