add option to capture stdout

This commit is contained in:
ading2210 2024-02-02 23:11:59 +00:00
parent bb9d9239c0
commit 3c517bbaf5
11 changed files with 64 additions and 20 deletions

View file

@ -6,15 +6,15 @@ set -e
SCRIPT_PATH=$(realpath $0)
BASE_PATH=$(dirname $SCRIPT_PATH)
SERVER_PATH="$BASE_PATH/wisp_server"
cd $BASE_PATH/wisp_server
if [ ! -d ".venv" ]; then
python3 -m venv .venv
if [ ! -d "$SERVER_PATH.venv" ]; then
python3 -m venv $SERVER_PATH/.venv
fi
source .venv/bin/activate
source $SERVER_PATH/.venv/bin/activate
if ! python3 -c "import websockets" 2> /dev/null; then
pip3 install -r requirements.txt
fi
python3 main.py
python3 $SERVER_PATH/main.py "$@"