diff --git a/install.sh b/install.sh index c391b033..3acd083a 100644 --- a/install.sh +++ b/install.sh @@ -112,7 +112,15 @@ get_distribution() { lsb_dist="" # Every system that we officially support has /etc/os-release if [ -r /etc/os-release ]; then - lsb_dist="$(. /etc/os-release && echo "$ID")" + # lsb_dist="$(. /etc/os-release && echo "$ID")" + # linux mint provides the information that it is "like" ubuntu + # if this is present, use $ID_LIKE + lsb_dist="$(. /etc/os-release && + if [ -n "$ID_LIKE" ]; + then echo "$ID_LIKE" + else echo "$ID" + fi + )" fi # Returning an empty string here should be alright since the # case statements don't act unless you provide an actual value @@ -305,7 +313,12 @@ do_install() { case "$lsb_dist" in ubuntu) - if command_exists lsb_release; then + # check also for ubuntu-like distros, such as linux mint + # if they do pass the `UBUNTU_CODENAME` + if [ -r /etc/os-release ]; then + dist_version=$(. /etc/os-release && echo "$UBUNTU_CODENAME") + fi + if [ -z "$dist_version" ] && command_exists lsb_release; then dist_version="$(lsb_release --codename | cut -f2)" fi if [ -z "$dist_version" ] && [ -r /etc/lsb-release ]; then @@ -348,6 +361,8 @@ do_install() { # Check if this is a forked Linux distro check_forked + echo "Detected distribution to use for installation: $lsb_dist and version $dist_version" + # Run setup for each distro accordingly case "$lsb_dist" in ubuntu|debian|raspbian)