diff --git a/eopkg_venv_functions.bash b/eopkg_venv_functions.bash index cf6bd3b..abc49b7 100644 --- a/eopkg_venv_functions.bash +++ b/eopkg_venv_functions.bash @@ -6,6 +6,9 @@ set -euo pipefail source shared_functions.bash +# allow user to override branch name +EOPKG_BRANCH="${BRANCH:-main}" + function prepare_venv () { if [[ -z "${PY3}" ]]; then die "Couldn't find supported python3 (3.11 || 3.12 || 3.10) interpreter, exiting!" @@ -15,7 +18,7 @@ function prepare_venv () { # Assume the user starts in the eopkg dir printInfo "Updating the eopkg git repo ..." # ensure we show the current branch - git fetch && git checkout main && git pull && git branch + git fetch && git checkout "${EOPKG_BRANCH}" && git pull && git branch printInfo "Set up a clean eopkg_venv venv ..." ${PY3} -m venv --system-site-packages --clear eopkg_venv