[tools] refactor: reorganize, commonalities, moar tags, posix compat
All checks were successful
eden-license / license-header (pull_request) Successful in 24s

all scripts are fully posix compliant

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-10-04 04:59:04 -04:00
parent 9c70334170
commit d9e641157e
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
18 changed files with 458 additions and 375 deletions

19
tools/cpm/common.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 crueter
# SPDX-License-Identifier: GPL-3.0-or-later
# shellcheck disable=SC2038
# shellcheck disable=SC2016
[ -z "$PACKAGES" ] && PACKAGES=$(find . src -maxdepth 3 -name cpmfile.json | xargs jq -s 'reduce .[] as $item ({}; . * $item)')
LIBS=$(echo "$PACKAGES" | jq -j 'keys_unsorted | join(" ")')
export PACKAGES
export LIBS
value() {
echo "$JSON" | jq -r ".$1"
}