update_req.sh : Added -e runtime option && Removed hardcoded Python version && Added shellcheck disable warning

This commit is contained in:
saundersp
2025-05-15 09:06:34 +02:00
parent 56f5107747
commit 7a0675d357

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
set -e
repeat_char(){ repeat_char(){
end="$1" end="$1"
for _ in $(seq 1 "$end") ; do for _ in $(seq 1 "$end") ; do
@ -15,7 +17,8 @@ header(){
VENV_PATH='./.venv' VENV_PATH='./.venv'
python3.12 -m venv --upgrade-deps "$VENV_PATH" python -m venv --upgrade-deps "$VENV_PATH"
# shellcheck disable=1091
if [ -f "$VENV_PATH"/Scripts/activate ]; then . "$VENV_PATH"/Scripts/activate if [ -f "$VENV_PATH"/Scripts/activate ]; then . "$VENV_PATH"/Scripts/activate
elif [ -f "$VENV_PATH"/bin/activate ]; then . "$VENV_PATH"/bin/activate elif [ -f "$VENV_PATH"/bin/activate ]; then . "$VENV_PATH"/bin/activate
else exit 1; fi else exit 1; fi