mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
Start: Add shell script
Same as the batch file. Also edit the python script to work when a venv is clean. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
22
start.sh
Normal file → Executable file
22
start.sh
Normal file → Executable file
@@ -1,5 +1,19 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
source ./venv/bin/activate
|
||||
pip -V
|
||||
python main.py
|
||||
|
||||
cd "$(dirname "$0")" || exit
|
||||
|
||||
if [ -n "$CONDA_PREFIX" ]; then
|
||||
echo "It looks like you're in a conda environment. Skipping venv check."
|
||||
else
|
||||
if [ ! -d "venv" ]; then
|
||||
echo "Venv doesn't exist! Creating one for you."
|
||||
python3 -m venv venv
|
||||
fi
|
||||
|
||||
echo "Activating venv"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source venv/bin/activate
|
||||
fi
|
||||
|
||||
python3 start.py "$@"
|
||||
|
||||
Reference in New Issue
Block a user