mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-11 20:07:47 +00:00
[tools, cmake] refactor: update/hash check scripts, use tags for some more deps, proper CPMUtil separation (#2666)
Uses tags for a bunch of deps that can use them Also adds a bunmch of scripts to tools/cpm, notably for checking hashes and checking for updates. TODO for the future: - CI target to check hashes - Weekly CI to check for updates Need to get that other CI runner up additional stuff - Ports gentoo fixes - makes solaris work (TODO: sdl2) - way better docs - properly separates CPMUtil as a standalone project Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2666 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
1a13e79c3d
commit
9f385bf627
55 changed files with 1197 additions and 683 deletions
25
tools/cpm/hash.sh
Executable file
25
tools/cpm/hash.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 crueter
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# usage: hash.sh repo tag-or-sha
|
||||
# env vars: GIT_HOST, USE_TAG (use tag instead of sha), ARTIFACT (download artifact with that name instead of src archive)
|
||||
|
||||
REPO="$1"
|
||||
[ -z "$GIT_HOST" ] && GIT_HOST=github.com
|
||||
GIT_URL="https://$GIT_HOST/$REPO"
|
||||
|
||||
if [ "$USE_TAG" = "true" ]; then
|
||||
if [ -z "$ARTIFACT" ] || [ "$ARTIFACT" = "null" ]; then
|
||||
URL="${GIT_URL}/archive/refs/tags/$2.tar.gz"
|
||||
else
|
||||
URL="${GIT_URL}/releases/download/$2/${ARTIFACT}"
|
||||
fi
|
||||
else
|
||||
URL="${GIT_URL}/archive/$2.zip"
|
||||
fi
|
||||
|
||||
SUM=$(wget -q "$URL" -O - | sha512sum)
|
||||
|
||||
echo "$SUM" | cut -d " " -f1
|
Loading…
Add table
Add a link
Reference in a new issue