diff --git a/skeleton/project_codename.sh b/skeleton/project_codename.sh index b577a4e..7957a98 100755 --- a/skeleton/project_codename.sh +++ b/skeleton/project_codename.sh @@ -1,10 +1,22 @@ #!/bin/bash +update=false script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) if [ ! -d "${script_dir}/.venv" ]; then python3 -m venv "$script_dir/.venv" fi # shellcheck disable=1091 source "$script_dir/.venv/bin/activate" -pip install -r "$script_dir/requirements.txt" > /dev/null -pip install "$script_dir/" > /dev/null +while [ "${#}" -gt 0 ] +do + case "${1}" in + '--update'|'-u') + shift + update=true + ;; + esac +done +if [ "${update}" == "true" ]; then + pip install -r "$script_dir/requirements.txt" > /dev/null + pip install "$script_dir/" > /dev/null +fi __project_codename__.py "${@}"