@@ -112,7 +112,15 @@ get_distribution() {
112
112
lsb_dist=" "
113
113
# Every system that we officially support has /etc/os-release
114
114
if [ -r /etc/os-release ]; then
115
- lsb_dist=" $( . /etc/os-release && echo " $ID " ) "
115
+ # lsb_dist="$(. /etc/os-release && echo "$ID")"
116
+ # linux mint provides the information that it is "like" ubuntu
117
+ # if this is present, use $ID_LIKE
118
+ lsb_dist=" $( . /etc/os-release &&
119
+ if [ -n " $ID_LIKE " ];
120
+ then echo " $ID_LIKE "
121
+ else echo " $ID "
122
+ fi
123
+ ) "
116
124
fi
117
125
# Returning an empty string here should be alright since the
118
126
# case statements don't act unless you provide an actual value
@@ -305,7 +313,12 @@ do_install() {
305
313
case " $lsb_dist " in
306
314
307
315
ubuntu)
308
- if command_exists lsb_release; then
316
+ # check also for ubuntu-like distros, such as linux mint
317
+ # if they do pass the `UBUNTU_CODENAME`
318
+ if [ -r /etc/os-release ]; then
319
+ dist_version=$( . /etc/os-release && echo " $UBUNTU_CODENAME " )
320
+ fi
321
+ if [ -z " $dist_version " ] && command_exists lsb_release; then
309
322
dist_version=" $( lsb_release --codename | cut -f2) "
310
323
fi
311
324
if [ -z " $dist_version " ] && [ -r /etc/lsb-release ]; then
@@ -348,6 +361,8 @@ do_install() {
348
361
# Check if this is a forked Linux distro
349
362
check_forked
350
363
364
+ echo " Detected distribution to use for installation: $lsb_dist and version $dist_version "
365
+
351
366
# Run setup for each distro accordingly
352
367
case " $lsb_dist " in
353
368
ubuntu|debian|raspbian)
0 commit comments