feat(installer): use curl to download .tgz
This commit is contained in:
parent
0aa104055a
commit
512fcf2bd7
2 changed files with 21 additions and 9 deletions
|
|
@ -1,3 +1,4 @@
|
|||
echo "post-commit..."
|
||||
git push gh
|
||||
git push sh
|
||||
. pack.sh
|
||||
git push gh
|
||||
git push sh
|
||||
|
|
|
|||
25
install.sh
25
install.sh
|
|
@ -1,26 +1,37 @@
|
|||
#! /bin/sh
|
||||
|
||||
INSTALL_DIR=$HOME/.local/lib/simple-tts
|
||||
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 "Installing to: $INSTALL_DIR"
|
||||
|
||||
git clone https://git.ayo.run/ayo/simple-tts $INSTALL_DIR
|
||||
python3 -m venv $INSTALL_DIR/.venv
|
||||
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/.venv/bin/activate
|
||||
. $INSTALL_DIR/simple-tts/.venv/bin/activate
|
||||
|
||||
python -m pip install -r $INSTALL_DIR/requirements.txt
|
||||
python -m pip install -r $INSTALL_DIR/simple-tts/requirements.txt
|
||||
|
||||
# deactivate environment
|
||||
deactivate
|
||||
|
||||
# make executable
|
||||
chmod u+x $INSTALL_DIR/tts.py
|
||||
chmod u+x $INSTALL_DIR/simple-tts/tts.py
|
||||
|
||||
# ln to bin
|
||||
ln $INSTALL_DIR/tts.py $EXECUTABLE_BIN/tts
|
||||
ln $INSTALL_DIR/simple-tts/tts.py $EXECUTABLE_BIN/tts
|
||||
|
||||
# final instructions
|
||||
echo "\n\nInstallation done! Now run: tts --help"
|
||||
|
|
|
|||
Loading…
Reference in a new issue