Remove unnecessary script parameters
This commit is contained in:
parent
96dff277e6
commit
0481482f23
1 changed files with 2 additions and 9 deletions
|
@ -6,9 +6,6 @@ $null = New-Module {
|
||||||
[switch]$System,
|
[switch]$System,
|
||||||
[Parameter(ParameterSetName="Home")]
|
[Parameter(ParameterSetName="Home")]
|
||||||
[string]$HomeDir = "~",
|
[string]$HomeDir = "~",
|
||||||
[Parameter(ParameterSetName="Profile", Mandatory)]
|
|
||||||
[string]$ProfileRoot,
|
|
||||||
[Parameter(ParameterSetName="Profile", Mandatory)]
|
|
||||||
[Parameter(ParameterSetName="Global", Mandatory)]
|
[Parameter(ParameterSetName="Global", Mandatory)]
|
||||||
[Parameter(ParameterSetName="Home")]
|
[Parameter(ParameterSetName="Home")]
|
||||||
[string]$Category = $null,
|
[string]$Category = $null,
|
||||||
|
@ -28,10 +25,8 @@ $null = New-Module {
|
||||||
$configRoot = "/etc";
|
$configRoot = "/etc";
|
||||||
}
|
}
|
||||||
|
|
||||||
$ProfileRoot = "$configRoot/powershell";
|
$profiles = @("$configRoot/powershell/.");
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (-not $ProfileRoot) {
|
|
||||||
[System.Collections.Generic.List[string]] $shells = @();
|
[System.Collections.Generic.List[string]] $shells = @();
|
||||||
|
|
||||||
if (Get-Command pwsh -ErrorAction SilentlyContinue) {
|
if (Get-Command pwsh -ErrorAction SilentlyContinue) {
|
||||||
|
@ -49,8 +44,6 @@ $null = New-Module {
|
||||||
|
|
||||||
Push-Location ~;
|
Push-Location ~;
|
||||||
$profiles = $profiles | ForEach-Object { [System.IO.Path]::GetRelativePath($(Get-Location), $_); };
|
$profiles = $profiles | ForEach-Object { [System.IO.Path]::GetRelativePath($(Get-Location), $_); };
|
||||||
} else {
|
|
||||||
$profiles = @("$ProfileRoot/.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Category) {
|
if ($Category) {
|
||||||
|
|
Loading…
Reference in a new issue