浏览代码

Fixed Debian detection in dependency installation

Stefan Schmidt 6 年之前
父节点
当前提交
afe36ea2da
共有 1 个文件被更改,包括 5 次插入0 次删除
  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