dotnet-installer/scripts/dotnet-cli-build/Utils/YumDependencyUtility.cs
Bryan ade5479196 Update CoreCLR & Corefx dependencies based on ldd method.
Use a hardcoded list for ubuntu and slight refactoring for cleaner targets
code.
2016-02-24 16:59:26 -08:00

22 lines
579 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Cli.Build
{
public class YumDependencyUtility
{
internal static bool PackageIsInstalled(string packageName)
{
var result = Command.Create("yum", "list", "installed", packageName)
.CaptureStdOut()
.CaptureStdErr()
.QuietBuildReporter()
.Execute();
return result.ExitCode == 0;
}
}
}