2016-02-23 23:27:03 +00:00
|
|
|
|
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
|
|
|
|
|
{
|
2016-05-12 00:20:40 +00:00
|
|
|
|
public static bool PackageIsInstalled(string packageName)
|
2016-02-23 23:27:03 +00:00
|
|
|
|
{
|
|
|
|
|
var result = Command.Create("yum", "list", "installed", packageName)
|
|
|
|
|
.CaptureStdOut()
|
|
|
|
|
.CaptureStdErr()
|
|
|
|
|
.QuietBuildReporter()
|
|
|
|
|
.Execute();
|
|
|
|
|
|
|
|
|
|
return result.ExitCode == 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|