Skip to content

Commit c015677

Browse files
Merge pull request #119 from hologram-io/bugfix/update-install-regex
Fix the regex that breaks the install script
2 parents 641acdb + e5f5770 commit c015677

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function install_software() {
6161
}
6262

6363
function check_python_version() {
64-
if ! python3 -V | grep '3.[9-11].[0-9]' > /dev/null 2>&1; then
64+
if ! python3 -V | grep -E '3.(9|1[012]).[0-9]' > /dev/null 2>&1; then
6565
echo "An unsupported version of python 3 is installed. Must have python 3.9+ installed to use the Hologram SDK"
6666
exit 1
6767
fi
@@ -124,7 +124,7 @@ do
124124
pause "Installing $program. Press [Enter] key to continue...";
125125
install_software 'python3-pip'
126126
fi
127-
if ! pip3 -V | grep '3.[7-9]' >/dev/null 2>&1; then
127+
if ! pip3 -V | grep -E '3.(9|1[012])' >/dev/null 2>&1; then
128128
echo "pip3 is installed for an unsupported version of python."
129129
exit 1
130130
fi

update.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ function install_software() {
5858
}
5959

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

0 commit comments

Comments
 (0)