mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-17 18:56:59 +02:00
[cmake, docs, tools] update CPMUtil (#3183)
Rewrote the entire tooling scheme. That's about it, just make sure tooling works as expected everywhere. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3183 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
80327312dd
commit
966fcc0c30
37 changed files with 1297 additions and 868 deletions
30
tools/cpm/package/util/fix-hash.sh
Executable file
30
tools/cpm/package/util/fix-hash.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 crueter
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
: "${PACKAGE:=$1}"
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. "$SCRIPTS"/vars.sh
|
||||
|
||||
[ "$CI" = null ] || exit 0
|
||||
|
||||
[ "$HASH_URL" = null ] || exit 0
|
||||
[ "$HASH_SUFFIX" = null ] || exit 0
|
||||
|
||||
[ "$HASH" = null ] && echo "-- * Package has no hash specified" && exit 0
|
||||
|
||||
ACTUAL=$("$SCRIPTS"/util/url-hash.sh "$DOWNLOAD")
|
||||
|
||||
if [ "$ACTUAL" != "$HASH" ] && [ "$QUIET" != true ]; then
|
||||
echo "-- * Expected $HASH"
|
||||
echo "-- * Got $ACTUAL"
|
||||
[ "$UPDATE" != "true" ] && exit 1
|
||||
fi
|
||||
|
||||
if [ "$UPDATE" = "true" ] && [ "$ACTUAL" != "$HASH" ]; then
|
||||
NEW_JSON=$(echo "$JSON" | jq ".hash = \"$ACTUAL\"")
|
||||
|
||||
"$SCRIPTS"/util/replace.sh "$PACKAGE" "$NEW_JSON"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue