Brought in with a subtree merge rather than a copy, so the port's 31 commits survive as history rather than arriving as one anonymous import. Landed under godot-import/ and moved into the final layout in the next commit, which keeps git's rename detection able to follow each file across the move.
24 lines
1003 B
Bash
Executable File
24 lines
1003 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build and run the exporter against the disc.
|
|
#
|
|
# build-export build only
|
|
# build-export --run build, export to ./export, then validate it
|
|
#
|
|
# The validate step is not optional politeness: `export` writes a tree and
|
|
# `check` is the only thing that says the tree is readable by anything other
|
|
# than the program that wrote it. A build that exports and does not check has
|
|
# not shown anything.
|
|
#
|
|
# Jobs are capped: this box runs two agent containers and a desktop, and an
|
|
# unbounded parallel build has crashed it. Do not raise this to "use all cores".
|
|
set -euo pipefail
|
|
cd "${PROJECT_DIR:-/work}"
|
|
export CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-3}"
|
|
cargo build --release -p sylpheed-export
|
|
if [ "${1:-}" = "--run" ]; then
|
|
shift
|
|
disc="${SYLPHEED_DISC:?set SYLPHEED_DISC to the extracted disc root}"
|
|
"$CARGO_TARGET_DIR/release/sylpheed-export" export --disc "$disc" --out export "$@"
|
|
exec "$CARGO_TARGET_DIR/release/sylpheed-export" check --out export
|
|
fi
|