Install commands, improvements
This commit is contained in:
@@ -5,10 +5,13 @@ public class ModuleConfiguration
|
||||
public string? Target { get; set; }
|
||||
public Dictionary<string, string>? Links { get; set; }
|
||||
|
||||
public ModuleConfiguration(string? target, Dictionary<string, string>? links)
|
||||
public string? Install { get; set; }
|
||||
|
||||
public ModuleConfiguration(string? target, Dictionary<string, string>? links, string? install)
|
||||
{
|
||||
Target = target;
|
||||
Links = links;
|
||||
Install = install;
|
||||
}
|
||||
|
||||
public ModuleConfiguration Merge(ModuleConfiguration merge)
|
||||
@@ -17,10 +20,11 @@ public class ModuleConfiguration
|
||||
.Concat(merge.Links ?? new Dictionary<string, string>());
|
||||
return new ModuleConfiguration(
|
||||
merge.Target ?? Target,
|
||||
new Dictionary<string, string>(mergedLinks)
|
||||
new Dictionary<string, string>(mergedLinks),
|
||||
merge.Install ?? Install
|
||||
);
|
||||
}
|
||||
|
||||
public static ModuleConfiguration Empty() =>
|
||||
new(null, new Dictionary<string, string>());
|
||||
new(null, new Dictionary<string, string>(), null);
|
||||
}
|
||||
@@ -2,6 +2,6 @@ namespace Alma.Services;
|
||||
|
||||
public interface IOsInformation
|
||||
{
|
||||
string GetOsIdentifier();
|
||||
bool IsOnPlatform(string platform);
|
||||
Task<string> GetOsIdentifierAsync();
|
||||
Task<bool> IsOnPlatformAsync(string platform);
|
||||
}
|
||||
6
src/Alma.Abstraction/Services/IShellService.cs
Normal file
6
src/Alma.Abstraction/Services/IShellService.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Alma.Services;
|
||||
|
||||
public interface IShellService
|
||||
{
|
||||
Task RunCommandAsync(string command);
|
||||
}
|
||||
Reference in New Issue
Block a user