Skip to content

Commit 016066f

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 b634a40 commit 016066f

File tree

1 file changed

+29
-15
lines changed

1 file changed

+29
-15
lines changed

Tools/environment_install/install-prereqs-ubuntu.sh

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,36 @@ 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'
63+
RELEASE_DISTRIBUTOR=$(lsb_release -i -s)
64+
case ${RELEASE_DISTRIBUTOR} in
65+
elementary)
66+
case ${RELEASE_CODENAME} in
67+
jolnir)
68+
RELEASE_CODENAME='focal'
69+
;;
6770
;;
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'
71+
LinuxMint)
72+
# translate Mint-codenames to Ubuntu-codenames based on https://www.linuxmint.com/download_all.php
73+
case ${RELEASE_CODENAME} in
74+
wilma | xia)
75+
RELEASE_CODENAME='noble'
76+
;;
77+
vanessa | vera | victoria | virginia)
78+
RELEASE_CODENAME='jammy'
79+
;;
80+
una | uma | ulyssa | ulyana)
81+
RELEASE_CODENAME='focal'
82+
;;
83+
tricia | tina | tessa | tara)
84+
RELEASE_CODENAME='bionic'
85+
;;
86+
elsie)
87+
RELEASE_CODENAME='bullseye'
88+
;;
89+
*)
90+
echo "Unable to map ${RELEASE_CODENAME} to an Ubuntu release. Please patch this script and submit a pull request, or report at https://github.com/ArduPilot/ardupilot/issues"
91+
exit 1
92+
esac
7993
;;
8094
esac
8195

0 commit comments

Comments
 (0)