diff --git a/bin/app b/bin/app index 2abe169..5b5d7cf 100755 --- a/bin/app +++ b/bin/app @@ -1,14 +1,13 @@ #!/bin/sh -set -euC +set -e _activate_venv() { . .venv/bin/activate } _venv() { - _py_version=${1:-3.12.0} - case "$1" in + "") _skip=false ;; --skip-install) _skip=true shift @@ -17,9 +16,11 @@ _venv() { esac if ! $_skip; then + _py_version=${1:-3.12.0} + pyenv install $_py_version - #init pyenv + #init pyenv export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" @@ -102,7 +103,7 @@ _main() { fi _cmd="${1:-help}" - if ! [ -z "$@" ]; then + if ! [[ -z "$@" ]]; then shift fi