2023-02-04 09:58:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
VENV_PATH="./venv/"
|
|
|
|
PYTHON_CMD=${1:-python}
|
|
|
|
|
|
|
|
if [ ! -d $VENV_PATH ]; then
|
|
|
|
echo "venv not found, creating one using the command '${PYTHON_CMD}'...";
|
|
|
|
$PYTHON_CMD -m venv venv;
|
|
|
|
source ./venv/bin/activate;
|
|
|
|
pip install --upgrade pip;
|
|
|
|
pip install -r requirements.txt;
|
2024-01-11 08:20:35 +00:00
|
|
|
./venv/bin/mkdocs serve;
|
2023-02-04 09:58:12 +00:00
|
|
|
else
|
|
|
|
echo "venv already found.";
|
|
|
|
source ./venv/bin/activate;
|
2024-01-11 08:20:35 +00:00
|
|
|
pip install --upgrade pip;
|
|
|
|
pip install -r requirements.txt;
|
|
|
|
./venv/bin/mkdocs serve;
|
2023-02-04 09:58:12 +00:00
|
|
|
fi;
|
|
|
|
|