27 lines
828 B
Bash
Executable File
27 lines
828 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
cd "$(dirname "$0")"
|
|
mode=${1:-}
|
|
if [ -z "$mode" ] && [ -t 0 ]; then
|
|
printf 'Install Docker server + ntfy, or native binaries only? [docker/native] (docker): '
|
|
read -r mode
|
|
mode=${mode:-docker}
|
|
fi
|
|
case "$mode" in
|
|
--docker|docker)
|
|
if [ "$#" -gt 0 ]; then shift; fi
|
|
exec python3 scripts/setup-docker.py "$@"
|
|
;;
|
|
--native|native)
|
|
if [ "$#" -gt 0 ]; then shift; fi
|
|
;;
|
|
'') echo 'Non-interactive binary-only install. Use ./install.sh --docker for the configured server + ntfy.' >&2 ;;
|
|
*) echo 'Usage: ./install.sh [--native | --docker [setup options]] (native honors GOBIN and GOPATH)' >&2; exit 2 ;;
|
|
esac
|
|
if [ "$#" -ne 0 ]; then
|
|
echo 'Usage: ./install.sh --native (honors GOBIN and GOPATH)' >&2
|
|
exit 2
|
|
fi
|
|
go install -trimpath ./cmd/...
|
|
exec go run ./cmd/pipelines skill install
|