IBM-Cloud / ibm-cloud-developer-tools

Installation scripts for new IBM Cloud Developer CLI Plugin and it's dependencies.
Apache License 2.0
131 stars 146 forks source link

idt-installer: Unable to identify "Linux Lite 5.0" which is a light weight Ubuntu Desktop Distro #167

Open Udayendu opened 4 years ago

Udayendu commented 4 years ago

Summary Unable to identify Linux Lite 5.0 LTS (The Ubuntu Desktop Distro)

Steps to reproduce (include tooling version, platform, etc)

  1. To install ibmcloud command use the below command:
    # curl -sL https://ibm.biz/idt-installer | bash

Operating System Linux Lite 5.0 LTS

Supporting details

#  lsb_release -ds
Linux Lite 5.0

# cat /etc/issue
Linux Lite 5.0 LTS \n \l

Error

# curl -sL https://ibm.biz/idt-installer | bash
[main] --==[ IBM Cloud Developer Tools for Linux/MacOS - Installer, v1.2.3 ]==--
[main] WARN: Linux has only been tested on Ubuntu, RedHat, Centos, Debian and Fedora distrubutions please let us know if you use this utility on other Distros
[install] Starting Update...
[install_deps] ERROR: This script has not been updated for use with your linux distribution (Linux Lite 5.0)

Code Fix

$ diff -u idt-installer Code/idt-installer
--- idt-installer       2020-06-04 13:10:02.676778264 +0530
+++ Code/idt-installer  2020-06-04 13:01:13.634010030 +0530
@@ -117,7 +117,7 @@
       install_darwin_deps
     ;;
   "Linux")
-    if [[ "${DISTRO}" == *Ubuntu* || "${DISTRO}" == *Debian* ]]; then
+    if [[ "${DISTRO}" == *Ubuntu* || "${DISTRO}" == *Debian* || "${DISTRO}" == *Linux*Lite* ]]; then
       install_deps_with_apt_get
     elif [[ "${DISTRO}" == *Red*Hat* || "${DISTRO}" == *CentOS* || "${DISTRO}" == *RHEL* || "${DISTRO}" == *Fedora* ]]; then
       install_deps_with_yum
@@ -424,7 +424,7 @@
   "Linux")
     # Linux distro, e.g "Ubuntu", "RedHatEnterpriseWorkstation", "RedHatEnterpriseServer", "CentOS", "Debian"
     DISTRO=$(lsb_release -ds 2>/dev/null || cat /etc/*release 2>/dev/null | head -n1 || uname -om || echo "")
-    if [[ "$DISTRO" != *Ubuntu* &&  "$DISTRO" != *Red*Hat* && "$DISTRO" != *CentOS* && "$DISTRO" != *Debian* && "$DISTRO" != *RHEL* && "$DISTRO" != *Fedora* ]]; then
+    if [[ "$DISTRO" != *Ubuntu* && "$DISTRO" != *Linux*Lite* &&  "$DISTRO" != *Red*Hat* && "$DISTRO" != *CentOS* && "$DISTRO" != *Debian* && "$DISTRO" != *RHEL* && "$DISTRO" != *Fedora* ]]; then
       warn "Linux has only been tested on Ubuntu, RedHat, Centos, Debian and Fedora distrubutions please let us know if you use this utility on other Distros"
     fi
     ;;