Skip to content

Commit 80e96d0

Browse files
author
Florian Kraemer
committed
Added a minor version check to the install.sh script.
1 parent f0beec4 commit 80e96d0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

install.sh

+7-5
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ else
1010
exit 1
1111
fi
1212

13-
# Get the version number of Python installed on the system.
13+
# Get the version string.
1414
python_version=$($python_cmd --version 2>&1 | awk '{print $2}')
1515

16-
# Extract the major version number (i.e. 3 from 3.x).
16+
# Extract the major and minor version numbers (i.e. 3 and 6 from 3.6.x)
1717
major_version=$(echo $python_version | cut -d. -f1)
18+
minor_version=$(echo $python_version | cut -d. -f2)
1819

19-
if [ "$major_version" == "3" ]; then
20-
echo "Python 3 is installed."
20+
# Check if the major version number is 3 and the minor version number is 6 or greater
21+
if [ "$major_version" == "3" ] && [ "$minor_version" -ge "6" ]; then
22+
echo "Python >= 3.6 is installed."
2123
else
22-
echo "Python 3 is not installed."
24+
echo "Python >= 3.6 is not installed."
2325
exit 1
2426
fi
2527

0 commit comments

Comments
 (0)