Updates the build script

This commit is contained in:
Dandaedre 2026-07-25 06:26:42 +02:00 committed by Dandaedre
parent 11f727ece1
commit 4a0f10c398
1 changed files with 12 additions and 16 deletions

View File

@ -1,20 +1,4 @@
#!/usr/bin/env bash
# ------------------------------------------------------------------
# Build wrapper that runs the “Ravenous” container image with Podman.
#
# Usage:
# ./build.sh [--help | <mode>] [make‑options …]
#
# Modes
# simple (default) – just run `make -N Ravenous.tex`
# full – run all the steps in the original script
#
# The remaining arguments after the mode are forwarded verbatim to
# the `make` command inside the container.
#
# Example:
# ./build.sh full --verbose clean
# ------------------------------------------------------------------
set -euo pipefail
@ -61,6 +45,7 @@ Modes:
clean – clean all build artifacts
player – build the player handbook
master – build the master handbook
balance – show all the balancing data
full – rerun a full build
Everything that follows the mode is forwarded verbatim to `make` inside
@ -88,6 +73,10 @@ HELP
MODE=clean
shift
;;
--balance|balance)
MODE=balance
shift
;;
*)
# All remaining arguments are passed straight to `make`
MAKE_ARGS+=("$@")
@ -214,10 +203,17 @@ case "$MODE" in
echo "--- Build Completed Successfully ---"
;;
balance)
echo ">>> Showing Balancing values (with args: ${MAKE_ARGS[@]})..."
run_podman monsters balance "${MAKE_ARGS[@]}" || exit $?
;;
*)
print_error "Unknown mode: $MODE"
exit 1
;;
esac
exit 0