Separate global and OS-specific config
This commit is contained in:
parent
4fe88bba12
commit
d0b055140e
15 changed files with 101 additions and 61 deletions
scripts/Common/Software/git
|
@ -17,18 +17,19 @@ param (
|
|||
[string] $User
|
||||
)
|
||||
|
||||
$root = "valhalla";
|
||||
$getConfig = $null;
|
||||
|
||||
if ($User) {
|
||||
$root = "$root$($IsWindows ? ".windows" : '').users.$User";
|
||||
$getConfig = { Get-UserConfig -UserName $User @args };
|
||||
$sudoArgs = @("-u", $User);
|
||||
$configArgs = @("--global");
|
||||
} else {
|
||||
$getConfig = { Get-OSConfig @args };
|
||||
$sudoArgs = @();
|
||||
$configArgs = @("--system");
|
||||
}
|
||||
|
||||
$config = Get-Config "$root.git";
|
||||
$config = & $getConfig "git";
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue