From 30dadb8dae74a6a6610d3dafc397848645c7b215 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 20 Jun 2016 12:08:08 -0700 Subject: [PATCH] Use -match instead of -eq Since the use of quotes in /etc/os-release is inconsistent across distributions, we have to match instead of exactly compare. --- build.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.psm1 b/build.psm1 index 7c4b9ead2..b82356df5 100644 --- a/build.psm1 +++ b/build.psm1 @@ -397,12 +397,12 @@ function Start-PSBootstrap { # Install dependencies for Linux and OS X if ($IsLinux) { precheck 'curl' "Bootstrap dependency 'curl' not found in PATH, please install!" > $null - if ($LinuxInfo.ID -eq 'ubuntu' -and $LinuxInfo.Version -eq '"14.04"') { + if ($LinuxInfo.ID -match 'ubuntu' -and $LinuxInfo.Version -match '14.04') { # Install ours and .NET's dependencies sudo apt-get update -qq sudo apt-get install -y -qq make g++ cmake libc6 libgcc1 libstdc++6 libcurl3 libgssapi-krb5-2 libicu52 liblldb-3.6 liblttng-ust0 libssl1.0.0 libunwind8 libuuid1 zlib1g clang-3.5 - } elseif ($LinuxInfo.ID -eq 'centos' -and $LinuxInfo.Version -eq '"7"') { sudo apt-get install -y -q make gcc cmake glibc libgcc libstdc++ libcurl krb5-libs libicu lldb openssl-libs libunwind libuuid zlib clang + } elseif ($LinuxInfo.ID -match 'centos' -and $LinuxInfo.Version -match '7') { } else { Write-Warning "This script only supports Ubuntu 14.04 and CentOS 7, you must install dependencies manually!" }