Overwrite categorized profile files
This commit is contained in:
parent
b91b80d1d3
commit
d1611db116
1 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@ $null = New-Module {
|
|||
[string]$Category = $null,
|
||||
[Parameter(Position=0, Mandatory=$true)]
|
||||
[string]$Statement,
|
||||
[switch]$Overwrite = $false
|
||||
[switch]$Overwrite
|
||||
)
|
||||
|
||||
[System.Collections.Generic.List[string]] $shells = @();
|
||||
|
@ -29,6 +29,10 @@ $null = New-Module {
|
|||
$profiles = $profiles | ForEach-Object { [System.IO.Path]::GetRelativePath($(Get-Location), $_); };
|
||||
|
||||
if ($Category) {
|
||||
if (-not $($Overwrite.IsPresent)) {
|
||||
$Overwrite = $true;
|
||||
}
|
||||
|
||||
$profiles = $profiles | ForEach-Object { Join-Path (Split-Path -Parent $_) "profile.d" "$Category.ps1"; };
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue