Files

15 lines
418 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
if [[ ! -x .venv/bin/python ]]; then
python3 -m venv .venv
fi
if [[ ! -f .venv/translator-installed ]]; then
.venv/bin/python -m pip install -e .
touch .venv/translator-installed
fi
if [[ ! -f config.toml ]]; then
cp config.example.toml config.toml
fi
exec .venv/bin/python -m local_translator --config "$PWD/config.toml"