PortValhalla/scripts/Windows/Software/git/Manage.ps1
2024-10-06 21:25:34 +02:00

28 lines
943 B
PowerShell

. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Config.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
& {
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
$base = "$PSScriptRoot/../../../Common/Software/git/Manage.ps1";
Start-SoftwareInstaller @args `
-Installer {
$params = "/WindowsTerminalProfile";
$defaultBranch = Get-OSConfig "git.defaultBranch";
if ($defaultBranch) {
$params += " /DefaultBranchName:`"$defaultBranch`"";
}
Install-ChocoPackage git -ArgumentList "--params", $params;
} `
-Configurator {
& $base ([InstallerAction]::Configure) @args;
} `
-UserConfigurator {
& $base ([InstallerAction]::ConfigureUser) @args;
};
} @args;