#!/usr/bin/env bash set -e VENV_DIR="${HOME}/.venv/braille_radio" case "${1}" in i|install) # To install Braille_Radio sudo apt install python3-venv python3-pip vlc -y python3 -m venv ${VENV_DIR} source ${VENV_DIR}/bin/activate pip install braille_radio ;; u|update) if [ ! -d "${VENV_DIR}" ]; then echo "Error: ${VENV_DIR} does not exist. Run '${0} install' first." exit 1 fi # To update Braille_Radio and the .venv source ${VENV_DIR}/bin/activate python -m pip install --upgrade pip setuptools wheel pip install --upgrade braille_radio deactivate ;; *) # To run Braille_Radio source ${VENV_DIR}/bin/activate braille_radio deactivate ;; esac