#!/bin/bash
set -eu

# TODO not sure if should cd; some paths might be relative..
cd "$(dirname "$0")"

# TODO not sure how to handle the fact that hug is not always available in systemd env
# although systemd-path user-binaries does show .local/bin on circleci machine. weird.
# perhaps it's some weird interaction with bash -l 
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"


if [[ -n "${PYTHONPATH:=}" ]]; then
    PREV=":$PYTHONPATH"
else
    PREV=""
fi
# TODO ugh. rely on installing or something??
PYTHONPATH="src$PREV" exec python3 -m promnesia "$@"
