d10_cs_generator/build.sh

34 lines
655 B
Bash
Executable File

#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
cd "$root"
case "${1-}" in
'')
if [ "$#" -ne 0 ]; then
echo "Usage: ./build.sh [--clean]" >&2
exit 2
fi
;;
--clean)
if [ "$#" -ne 1 ]; then
echo "Usage: ./build.sh [--clean]" >&2
exit 2
fi
rm -rf -- "$root/build" "$root/RPG/d10_character_sheet"
;;
*)
echo "Usage: ./build.sh [--clean]" >&2
exit 2
;;
esac
if [ -x "$root/.venv/bin/python" ]; then
python="$root/.venv/bin/python"
else
python=python3
fi
"$python" tools/publish_builds.py