Browse Source

Fixed Debian detection in dependency installation

Stefan Schmidt 6 years ago
parent
commit
afe36ea2da
1 changed files with 5 additions and 0 deletions
  1. 5 0
      resources/install_dependencies.sh

+ 5 - 0
resources/install_dependencies.sh

@@ -95,6 +95,11 @@ elif [ "$KERNEL" = 'Linux' ]; then
     OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | sed 's/"//g' | tr '[:upper:]' '[:lower:]')
     OS_LIKE=$(awk '/ID_LIKE=/' /etc/*-release | sed 's/ID_LIKE=//' | sed 's/"//g' | tr '[:upper:]' '[:lower:]')
 
+    if [ -z "$OS_LIKE" ]; then
+        # This distribution is missing the os-release file, so try lsb_release
+        OS_LIKE=$(lsb_release -si | tr '[:upper:]' '[:lower:]')
+    fi
+
     if [ "$OS_LIKE" = 'archlinux' ]; then
         echo -e "Detected OS: Arch Linux"
         install_pkg_arch