Browse Source

Fix for dependency-script to make it fail less cryptically on weird OSes missing lsb-release

Stefan Schmidt 6 years ago
parent
commit
d22aa79c95
1 changed files with 4 additions and 4 deletions
  1. 4 4
      resources/install_dependencies.sh

+ 4 - 4
resources/install_dependencies.sh

@@ -86,7 +86,7 @@ install_pip()
 
 KERNEL=$(uname)
 
-if [ $KERNEL = 'Darwin' ]; then
+if [ "$KERNEL" = 'Darwin' ]; then
     echo -e "Detected OS:  macOS"
 
     which brew
@@ -98,16 +98,16 @@ if [ $KERNEL = 'Darwin' ]; then
     install_pkg_darwin
     install_pip
     exit 0
-elif [ $KERNEL = 'Linux' ]; then
+elif [ "$KERNEL" = 'Linux' ]; then
     # Kernel is Linux, check for supported distributions
     OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr '[:upper:]' '[:lower:]')
 
-    if [ $OS = 'arch' ]; then
+    if [ "$OS" = 'arch' ]; then
         echo -e "Detected OS: Arch Linux"
         install_pkg_arch
         install_pip
         exit 0
-    elif [ $OS = 'ubuntu' ]; then
+    elif [ "$OS" = 'ubuntu' ]; then
         echo -e "Detected OS: Ubuntu"
         install_pkg_ubuntu
         install_pip