2024-08-23 20:38:28 +00:00
|
|
|
param(
|
|
|
|
$Action,
|
|
|
|
[hashtable] $Arguments
|
|
|
|
)
|
|
|
|
|
2024-08-23 21:44:51 +00:00
|
|
|
. "$PSScriptRoot/Constants.ps1";
|
2024-08-23 20:38:28 +00:00
|
|
|
. "$PSScriptRoot/../PowerShell/Profile.ps1";
|
|
|
|
. "$PSScriptRoot/../../Scripts/Software.ps1";
|
|
|
|
|
|
|
|
Start-SoftwareInstaller @PSBoundParameters `
|
|
|
|
-Configurator {
|
2024-08-23 21:44:51 +00:00
|
|
|
. "$PSScriptRoot/Constants.ps1";
|
|
|
|
$pathExpression = Get-GlobalConfigExpression;
|
|
|
|
$path = Get-GlobalConfigPath;
|
2024-08-23 20:38:28 +00:00
|
|
|
$null = New-Item -Force -ItemType Directory (Split-Path -Parent $path);
|
|
|
|
Copy-Item -Force "$PSScriptRoot/aliae.yml" $path;
|
|
|
|
|
|
|
|
Add-PowerShellProfileStatement `
|
|
|
|
-System `
|
|
|
|
-Category "aliae" `
|
|
|
|
-Script (
|
|
|
|
@(
|
|
|
|
{
|
|
|
|
#aliae
|
|
|
|
},
|
|
|
|
"`$globalPath = $pathExpression",
|
|
|
|
{
|
|
|
|
$userPath = & {
|
|
|
|
if ($env:ALIAE_CONFIG) {
|
|
|
|
$env:ALIAE_CONFIG;
|
|
|
|
} else {
|
|
|
|
"~/.aliae.yaml";
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (Test-Path $globalPath) {
|
|
|
|
& ([scriptblock]::Create((aliae init pwsh --config $globalPath)));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Test-Path $userPath) {
|
|
|
|
& ([scriptblock]::Create((aliae init pwsh)));
|
|
|
|
}
|
|
|
|
|
|
|
|
& ([scriptblock]::Create((aliae completion powershell)));
|
|
|
|
}
|
|
|
|
) -join [System.Environment]::NewLine)
|
|
|
|
} `
|
|
|
|
-UserConfigurator {
|
|
|
|
Copy-Item -Force "$PSScriptRoot/aliae.yml" ~/.aliae.yaml;
|
|
|
|
};
|