#!/bin/sh set -eu root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) if [ "$(id -u)" = 0 ]; then echo 'Run this script as your regular user, without sudo. It will call sudo for the service.' >&2 exit 1 fi python3 -m venv "$root/.venv" "$root/.venv/bin/python" -m pip install -r "$root/bgtts/requirements.txt" sudo python3 "$root/script/install-service.py" --python "$root/.venv/bin/python" --user "$(id -un)" "$@"