Adds a build script
Build Successful The build was successful
Ravenous/Ravenous-LaTeX/pipeline/head This commit looks good Details

This commit is contained in:
Dandaedre 2026-07-10 23:54:40 +02:00
parent 7a1f018ea0
commit c2b1622da3
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
1 changed files with 68 additions and 0 deletions

68
build.sh Executable file
View File

@ -0,0 +1,68 @@
#!/usr/bin/env bash
# Script Configuration
URL="https://proxy.dandaedre.com/gitea/Ravenous/podman_ravenous"
CONTAINER_IMAGE="localhost/ravenous-podman:latest"
print_error() {
echo "Error: $1" >&2
echo "Please check the setup at:" >&2
echo "$URL" >&2
}
# --- Prerequisites Check ---
# 1. Check if Podman is installed and in PATH
if ! command -v podman &> /dev/null; then
print_error "Podman is not installed."
exit 1
fi
# 2. Check if the specific container image exists locally
# (Using 'image inspect' to verify exact match)
if ! podman image inspect "$CONTAINER_IMAGE" > /dev/null 2>&1; then
print_error "Container image '$CONTAINER_IMAGE' is not installed."
exit 1
fi
echo "--- Prerequisites met ---"
# --- Build Logic Selection ---
MODE="${1:-simple}" # Default to simple if no argument provided
case "$MODE" in
--full | full)
echo ">>> Executing FULL build sequence..."
# Podman Run: tablegen -e all (Note: No tty or rm flags here per your spec,
# though usually recommended. Keeping exact input commands.)
podman run --rm -v "$(pwd)":/workspace "$CONTAINER_IMAGE" tablegen -e all
mkdir -p ~/.local/share/fonts/
mkdir -p ./Images/Radar/
cp ./Ressources/lmroman8-regular.ttf ~/.local/share/fonts/
podman run --rm --tty -v "$(pwd)":/workspace "$CONTAINER_IMAGE" graphs load
podman run --rm --tty -v "$(pwd)":/workspace "$CONTAINER_IMAGE" graphs gen
podman run --rm --tty -v "$(pwd)":/workspace "$CONTAINER_IMAGE" make -N Ravenous.tex
podman run --rm --tty -v "$(pwd)":/workspace "$CONTAINER_IMAGE" make -t glossaries -N Ravenous.tex
podman run --rm --tty -v "$(pwd)":/workspace "$CONTAINER_IMAGE" make -N Ravenous.tex
;;
*) # Defaults to Simple Build
echo ">>> Executing SIMPLE build..."
podman run --rm --tty -v "$(pwd)":/workspace "$CONTAINER_IMAGE" make -N Ravenous.tex
if [ $? -eq 0 ]; then
echo "--- Build Completed Successfully ---"
else
exit 1 # Propagate error code from the last command in simple mode
fi
esac
exit 0