This repository has been archived on 2026-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
Ravenous-LaTeX/ravenous_build.sh

41 lines
1.4 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
#
# ravenous_build.sh
#
# Usage:
# ./ravenous_build.sh # → make -N
# ./ravenous_build.sh foo bar # → make -N -o foo bar
#
# All four preparatory podman steps are executed in any case.
#
set -euo pipefail # safer shell behaviour
# ------------------------------------------------------------------
# 1. Run the preparatory podman commands
# ------------------------------------------------------------------
podman run --rm -it -v "$(pwd)":/workspace \
localhost/ravenous-podman:latest tablegen -e all
podman run --rm -it -v "$(pwd)":/workspace \
localhost/ravenous-podman:latest graphs load
podman run --rm -it -v "$(pwd)":/workspace \
localhost/ravenous-podman:latest graphs gen
podman run --rm -it -v "$(pwd)":/workspace \
localhost/ravenous-podman:latest make -t glossaries Ravenous.tex
# ------------------------------------------------------------------
# 2. Final build step – choose -o or not
# ------------------------------------------------------------------
if [ $# -eq 0 ]; then
# No extra arguments
podman run --rm -it -v "$(pwd)":/workspace \
localhost/ravenous-podman:latest make -N Ravenous.tex
else
# Forward every supplied argument to make via -o
podman run --rm -it -v "$(pwd)":/workspace \
localhost/ravenous-podman:latest make -N Ravenous.tex -o "$@"
fi