Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the regex that breaks the install script #119

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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