PortValhalla/scripts/Windows/Software/git/Manage.ps1

41 lines
1.1 KiB
PowerShell
Raw Normal View History

2024-08-10 13:28:10 +00:00
param (
$Action,
[hashtable] $Arguments
)
2024-09-23 01:33:17 +00:00
. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
2024-08-10 13:28:10 +00:00
. "$PSScriptRoot/../../../Common/Scripts/Config.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
2024-08-22 23:43:26 +00:00
& {
2024-08-10 13:28:10 +00:00
param(
[hashtable] $Parameters
)
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
2024-08-22 23:43:26 +00:00
$base = "$PSScriptRoot/../../../Common/Software/git/Manage.ps1";
2024-08-10 13:28:10 +00:00
Start-SoftwareInstaller @Parameters `
-Installer {
$params = "/WindowsTerminalProfile";
2024-09-22 15:50:05 +00:00
$defaultBranch = Get-OSConfig "git.defaultBranch";
2024-08-10 13:28:10 +00:00
if ($defaultBranch) {
$params += " /DefaultBranchName:`"$defaultBranch`"";
}
Install-ChocoPackage git -ArgumentList "--params",$params;
} `
-Configurator {
2024-08-22 23:43:26 +00:00
& $base ([InstallerAction]::Configure);
} `
-UserConfigurator {
param(
$Arguments
)
2024-08-10 13:28:10 +00:00
2024-08-22 23:43:26 +00:00
& $base ([InstallerAction]::ConfigureUser) @PSBoundParameterrs;
};
} $PSBoundParameters;