Merge branch 'rel/1.0.0' of https://github.com/dotnet/cli into cli-x86-support
This commit is contained in:
commit
01d2656be1
132 changed files with 4399 additions and 527 deletions
24
scripts/dotnet-cli-build/Utils/AptDependencyUtility.cs
Normal file
24
scripts/dotnet-cli-build/Utils/AptDependencyUtility.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class AptDependencyUtility
|
||||
{
|
||||
internal static bool PackageIsInstalled(string packageName)
|
||||
{
|
||||
var result = Command.Create("dpkg", "-s", packageName)
|
||||
.CaptureStdOut()
|
||||
.CaptureStdErr()
|
||||
.QuietBuildReporter()
|
||||
.Execute();
|
||||
|
||||
return result.ExitCode == 0;
|
||||
}
|
||||
}
|
||||
}
|
22
scripts/dotnet-cli-build/Utils/YumDependencyUtility.cs
Normal file
22
scripts/dotnet-cli-build/Utils/YumDependencyUtility.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue