#!/bin/sh set -e set -x configdir=$HOME/.config/tgschedpub DIR="$(dirname "$(realpath "$0")")" cd "$DIR" install=0 [ -d .venv ] || install=1 if [ $install -eq 1 ]; then python3 -m venv .venv; fi ./.venv/bin/activate if [ $install -eq 1 ]; then pip install -r requirements.txt; fi [ -d "$configidr" ] || { >&2 echo "error: config directory does not exists" exit 1 } [ -f "$configdir/config.yaml" ] || { >&2 echo "error: $configdir/config.yaml does not exists" exit 1 } ./tgschedpub.py "$@"