#! /bin/sh DOWNLOAD_URL="https://git.ayo.run/ayo/simple-tts/raw/branch/main/simple-tts.tgz" INSTALL_DIR=$HOME/.local/lib EXECUTABLE_BIN=$HOME/.local/bin TEMP_DIR=$(mktemp -d) cleanup() { rm -rf $TEMP_DIR; } trap cleanup EXIT echo "Removing old installation if they exist" rm -rf $INSTALL_DIR/simple-tts rm $EXECUTABLE_BIN/tts echo "Installing to: $INSTALL_DIR" echo "Downloading simple-tts.tgz" curl --fail --show-error --location --progress-bar \ -o $TEMP_DIR/simple-tts.tgz "$DOWNLOAD_URL" tar -xzf $TEMP_DIR/simple-tts.tgz -C "$INSTALL_DIR" python3 -m venv $INSTALL_DIR/simple-tts/.venv # activate environment . $INSTALL_DIR/simple-tts/.venv/bin/activate python -m pip install -r $INSTALL_DIR/simple-tts/requirements.txt # deactivate environment deactivate # make executable chmod u+x $INSTALL_DIR/simple-tts/tts.py # ln to bin ln $INSTALL_DIR/simple-tts/tts.py $EXECUTABLE_BIN/tts # final instructions echo "\n\nInstallation done! Now run: tts --help"