108c29f9eb
Checks the CLI on the server's PATH (install command when missing), signs in with the harness's own login only when needed (--login forces it), keeps the OpenCode/Pi model pickers, and verifies with the server's check. Works on native and Docker installs (Docker delegates to the container setup); --host is a hidden compatibility alias. harness list shows all four harnesses' installed/signed-in/configured/default status. ./install --opencode|--pi now point to the command; ./install ends with the next-step hint.
36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
cd "$(dirname "$0")"
|
|
if ! command -v python3 >/dev/null 2>&1; then
|
|
echo "Python 3.9 or newer is required; install it and rerun ./install." >&2
|
|
exit 1
|
|
fi
|
|
python3 -c 'import sys; sys.exit(0 if sys.version_info >= (3, 9) else "Python 3.9 or newer is required")'
|
|
mode=${1:-}
|
|
case "$mode" in
|
|
--opencode|--pi)
|
|
echo "./install $mode was removed; run: pipelines harness setup ${mode#--}" >&2
|
|
exit 2
|
|
;;
|
|
--docker|docker)
|
|
if [ "$#" -gt 0 ]; then shift; fi
|
|
exec python3 scripts/setup-docker.py "$@"
|
|
;;
|
|
--web|web)
|
|
# Rebuild the web app in Docker (reused while app sources are unchanged).
|
|
shift
|
|
exec python3 scripts/app_build.py web "$@"
|
|
;;
|
|
--apk|apk)
|
|
# The optional Android app: built in Docker with the Android SDK (slower),
|
|
# then offered to phones at /updates/ on the web address.
|
|
shift
|
|
exec python3 scripts/app_build.py apk "$@"
|
|
;;
|
|
--native|native)
|
|
shift
|
|
exec python3 scripts/setup-native.py "$@"
|
|
;;
|
|
*) exec python3 scripts/setup-native.py "$@" ;;
|
|
esac
|