Explorar o código

Improved detection for Linux distributions using quotes around LSB variable values

Stefan Schmidt %!s(int64=6) %!d(string=hai) anos
pai
achega
dabe46f231
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      resources/install_dependencies.sh

+ 2 - 2
resources/install_dependencies.sh

@@ -114,8 +114,8 @@ if [ "$KERNEL" = 'Darwin' ]; then
     exit 0
 elif [ "$KERNEL" = 'Linux' ]; then
     # Kernel is Linux, check for supported distributions
-    OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr '[:upper:]' '[:lower:]')
-    OS_LIKE=$(awk '/ID_LIKE=/' /etc/*-release | sed 's/ID_LIKE=//' | tr '[:upper:]' '[:lower:]')
+    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 [ "$OS_LIKE" = 'archlinux' ]; then
         echo -e "Detected OS: Arch Linux"