Use VERSION_ID instead of Version from /etc/os-release

They are different fields and VERSION_ID is just the number.
This commit is contained in:
Andrew Schwartzmeyer
2016-06-20 12:13:22 -07:00
parent f3070bf28b
commit bedcff49f6
+3 -3
View File
@@ -396,11 +396,11 @@ function Start-PSBootstrap {
try {
# Install dependencies for Linux and OS X
if ($IsLinux) {
if ($LinuxInfo.ID -match 'ubuntu' -and $LinuxInfo.Version -match '14.04') {
if ($LinuxInfo.ID -match 'ubuntu' -and $LinuxInfo.VERSION_ID -match '14.04') {
# Install ours and .NET's dependencies
sudo apt-get install -y -qq curl 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 -match 'centos' -and $LinuxInfo.Version -match '7') {
sudo apt-get install -y -q curl 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_ID -match '7') {
sudo yum install -y -q curl make gcc cmake glibc libgcc libstdc++ libcurl krb5-libs libicu lldb openssl-libs libunwind libuuid zlib clang
} else {
Write-Warning "This script only supports Ubuntu 14.04 and CentOS 7, you must install dependencies manually!"
}