Fix Ubuntu detection

This commit is contained in:
Stanislas Lange 2023-01-22 12:11:19 +01:00
parent 5b483ecb89
commit 2f7e346767
No known key found for this signature in database

View File

@ -39,6 +39,12 @@ function checkOS() {
exit 1
fi
OS=debian # overwrite if raspbian
elif [[ ${OS} == "ubuntu" ]]; then
RELEASE_YEAR=$(echo "${VERSION_ID}" | cut -d'.' -f1)
if [[ ${RELEASE_YEAR} -lt 18 ]]; then
echo "Your version of Ubuntu (${VERSION_ID}) is not supported. Please use Ubuntu 18.04 or later"
exit 1
fi
elif [[ ${OS} == "fedora" ]]; then
if [[ ${VERSION_ID} -lt 32 ]]; then
echo "Your version of Fedora (${VERSION_ID}) is not supported. Please use Fedora 32 or later"