Browse Source

Improved detection for Linux distributions using quotes around LSB variable values

Stefan Schmidt 6 years ago
parent
commit
dabe46f231
1 changed files with 2 additions and 2 deletions
  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"