Skip to content

Commit 97bfbff

Browse files
committed
Tools: environment_install: make sure Linux Mint dist is always mapped
... to an Uubntu release. Saves confusion on newer Mint releases as thje install will fail with a clear message rather than get confused on packages
1 parent 39ac45a commit 97bfbff

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

Tools/environment_install/install-prereqs-ubuntu.sh

+24-16
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,30 @@ fi
6060
# Checking Ubuntu release to adapt software version to install
6161
RELEASE_CODENAME=$(lsb_release -c -s)
6262

63-
# translate Mint-codenames to Ubuntu-codenames based on https://www.linuxmint.com/download_all.php
64-
case ${RELEASE_CODENAME} in
65-
wilma | xia)
66-
RELEASE_CODENAME='noble'
67-
;;
68-
vanessa | vera | victoria | virginia)
69-
RELEASE_CODENAME='jammy'
70-
;;
71-
una | uma | ulyssa | ulyana | jolnir)
72-
RELEASE_CODENAME='focal'
73-
;;
74-
tricia | tina | tessa | tara)
75-
RELEASE_CODENAME='bionic'
76-
;;
77-
elsie)
78-
RELEASE_CODENAME='bullseye'
63+
RELEASE_DISTRIBUTOR=$(lsb_release -i -s)
64+
case ${RELEASE_DISTRIBUTOR} in
65+
LinuxMint)
66+
# translate Mint-codenames to Ubuntu-codenames based on https://www.linuxmint.com/download_all.php
67+
case ${RELEASE_CODENAME} in
68+
wilma | xia)
69+
RELEASE_CODENAME='noble'
70+
;;
71+
vanessa | vera | victoria | virginia)
72+
RELEASE_CODENAME='jammy'
73+
;;
74+
una | uma | ulyssa | ulyana | jolnir)
75+
RELEASE_CODENAME='focal'
76+
;;
77+
tricia | tina | tessa | tara)
78+
RELEASE_CODENAME='bionic'
79+
;;
80+
elsie)
81+
RELEASE_CODENAME='bullseye'
82+
;;
83+
*)
84+
echo "Unable to map ${RELEASE_CODENAME} to an Ubuntu release"
85+
exit 1
86+
esac
7987
;;
8088
esac
8189

0 commit comments

Comments
 (0)