Skip to content

Commit

Permalink
Fix the regex that breaks the install script
Browse files Browse the repository at this point in the history
  • Loading branch information
parker-hologram committed Sep 5, 2023
1 parent 641acdb commit e5f5770
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function install_software() {
}

function check_python_version() {
if ! python3 -V | grep '3.[9-11].[0-9]' > /dev/null 2>&1; then
if ! python3 -V | grep -E '3.(9|1[012]).[0-9]' > /dev/null 2>&1; then
echo "An unsupported version of python 3 is installed. Must have python 3.9+ installed to use the Hologram SDK"
exit 1
fi
Expand Down Expand Up @@ -124,7 +124,7 @@ do
pause "Installing $program. Press [Enter] key to continue...";
install_software 'python3-pip'
fi
if ! pip3 -V | grep '3.[7-9]' >/dev/null 2>&1; then
if ! pip3 -V | grep -E '3.(9|1[012])' >/dev/null 2>&1; then
echo "pip3 is installed for an unsupported version of python."
exit 1
fi
Expand Down
6 changes: 3 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ function install_software() {
}

function check_python_version() {
if ! python3 -V | grep '3.[7-9].[0-9]' > /dev/null 2>&1; then
echo "An unsupported version of python 3 is installed. Must have python 3.7+ installed to use the Hologram SDK"
if ! python3 -V | grep -E '3.(9|1[012]).[0-9]' > /dev/null 2>&1; then
echo "An unsupported version of python 3 is installed. Must have python 3.9+ installed to use the Hologram SDK"
exit 1
fi
}
Expand Down Expand Up @@ -132,7 +132,7 @@ do
pause "Installing $program. Press [Enter] key to continue...";
install_software 'python3-pip'
fi
if ! pip3 -V | grep '3.[7-9]' >/dev/null 2>&1; then
if ! pip3 -V | grep -E '3.(9|1[012])' >/dev/null 2>&1; then
echo "pip3 is installed for an unsupported version of python."
exit 1
fi
Expand Down

0 comments on commit e5f5770

Please sign in to comment.