Skip to content

Commit

Permalink
op.sh: fix python version check (commaai#33163)
Browse files Browse the repository at this point in the history
fix check
  • Loading branch information
maxime-desroches authored Aug 1, 2024
1 parent 3e66827 commit 7bf912f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/op.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function op_check_python() {
if [[ -z $INSTALLED_PYTHON_VERSION ]]; then
echo -e " ↳ [${RED}${NC}] python3 not found on your system. You need python version at least $(echo $REQUIRED_PYTHON_VERSION | tr -d -c '[0-9.]') to continue!"
return 1
elif [[ $(echo $INSTALLED_PYTHON_VERSION | tr -d -c '[0-9]') -ge $(($(echo $REQUIRED_PYTHON_VERSION | tr -d -c '[0-9]') * 10)) ]]; then
elif [[ $(echo $INSTALLED_PYTHON_VERSION | grep -o '[0-9]\+\.[0-9]\+' | tr -d -c '[0-9]') -ge $(echo $REQUIRED_PYTHON_VERSION | tr -d -c '[0-9]') ]]; then
echo -e " ↳ [${GREEN}${NC}] $INSTALLED_PYTHON_VERSION detected."
else
echo -e " ↳ [${RED}${NC}] You need python version at least $(echo $REQUIRED_PYTHON_VERSION | tr -d -c '[0-9.]') to continue!"
Expand Down

0 comments on commit 7bf912f

Please sign in to comment.