first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||
python_cmd="${CODEX_IMAGEGEN_PYTHON:-}"
|
||||
if [[ -z "$python_cmd" ]]; then
|
||||
embedded_python="$HOME/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/python.exe"
|
||||
if [[ -x "$embedded_python" ]]; then
|
||||
python_cmd="$embedded_python"
|
||||
else
|
||||
python_cmd="$(command -v python3 || command -v python || true)"
|
||||
fi
|
||||
fi
|
||||
if [[ -z "$python_cmd" ]]; then
|
||||
printf '%s\n' "Python 3 not found; install Python or set CODEX_IMAGEGEN_PYTHON." >&2
|
||||
exit 1
|
||||
fi
|
||||
runtime="$($python_cmd "$script_dir/runtime.py" --keyring)"
|
||||
exec "$runtime" "$script_dir/generate_image.py" "$@"
|
||||
Reference in New Issue
Block a user