2022-08-28 13:02:29 +08:00

24 lines
369 B
Bash
Executable File

#!/usr/bin/env bash
SCRIPTDIR=$(dirname $0)
BASEDIR=$(dirname $SCRIPTDIR)
pip_options=()
if [ ! -z "${PYPI_MIRROR}" ]; then
pip_options+=(-i "${PYPI_MIRROR}")
fi
create-venv() {
python -m venv venv
}
install-requirements() {
pip install "${pip_options[@]}" -r requirements.txt
}
pushd ${BASEDIR}
create-venv
. ./venv/bin/activate
install-requirements