[cmake, tools, docs] Update CPMUtil (#2790)

updates CPMUtil to
[`8f9b39fc98`](8f9b39fc98)

Makes the tooling/docs better and enforces usage of tar.gz everywhere as
opposed to zips

Signed-off-by: crueter <crueter@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2790
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
crueter 2025-10-20 03:43:15 +02:00
parent d7cd7c6313
commit 2e9dbe3f1d
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
30 changed files with 570 additions and 118 deletions

View file

@ -3,21 +3,51 @@
# SPDX-FileCopyrightText: 2025 crueter
# SPDX-License-Identifier: GPL-3.0-or-later
# env vars:
# - UPDATE: update if available
# - FORCE: forcefully update
# shellcheck disable=SC1091
. tools/cpm/common.sh
RETURN=0
filter() {
TAGS=$(echo "$TAGS" | jq "[.[] | select(.name | test(\"$1\"; \"i\") | not)]") # vulkan
TAGS=$(echo "$TAGS" | jq "[.[] | select(.name | test(\"$1\"; \"i\") | not)]")
}
for PACKAGE in "$@"
do
usage() {
cat << EOF
Usage: $0 [uf] [PACKAGE]...
Check a specific package or packages for updates.
Options:
-u, --update Update the package if a new version is available.
This will also update the hash if provided.
-f, --force Forcefully update the package version (implies -u)
This is seldom useful, and should only be used in cases of
severe corruption.
This project has defined the following as valid cpmfiles:
EOF
for file in $CPMFILES; do
echo "- $file"
done
exit $RETURN
}
while true; do
case "$1" in
(-uf|--force) UPDATE=true; FORCE=true; continue ;;
(-u|--update) UPDATE=true; continue ;;
(-h) usage ;;
("$0") break ;;
("") break ;;
esac
PACKAGE="$1"
shift
export PACKAGE
# shellcheck disable=SC1091
. tools/cpm/package.sh
@ -67,7 +97,6 @@ do
echo "-- * Version $LATEST available, current is $TAG"
export USE_TAG=true
HASH=$(tools/cpm/hash.sh "$REPO" "$LATEST")
echo "-- * New hash: $HASH"