| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | VENV_PATH="./.venv/" |
| 6 | PYTHON_CMD=${1:-python} |
| 7 | |
| 8 | if [scip-shell system . . `[`. ! -d $VENV_PATH ]; then |
| 9 | echoscip-shell system . . echo. "venv not found, creating one using the command '${PYTHON_CMD}'..."; |
| 10 | $PYTHON_CMD -m venv .venv; |
| 11 | source $VENV_PATH/bin/activate; |
| 12 | pipscip-shell system . . pip. install --upgrade pip; |
| 13 | pipscip-shell system . . pip. install -r requirements.txt; |
| 14 | $VENV_PATH/bin/mkdocs serve; |
| 15 | else |
| 16 | echoscip-shell system . . echo. "venv already found."; |
| 17 | source $VENV_PATH/bin/activate; |
| 18 | pipscip-shell system . . pip. install --upgrade pip; |
| 19 | pipscip-shell system . . pip. install -r requirements.txt; |
| 20 | $VENV_PATH/bin/mkdocs serve; |
| 21 | fi; |
| 22 |