Refactor PowerShell profile script
This commit is contained in:
parent
2dfb9d58bf
commit
a34aa6c143
10 changed files with 126 additions and 122 deletions
scripts/Common/Scripts
|
@ -1,6 +1,6 @@
|
|||
#!/bin/pwsh
|
||||
. "$PSScriptRoot/../../Common/Scripts/Entrypoints.ps1";
|
||||
. "$PSScriptRoot/../../Common/Software/PowerShell/profile.ps1";
|
||||
. "$PSScriptRoot/../../Common/Software/PowerShell/Profile.ps1";
|
||||
|
||||
class Context {
|
||||
[string]$EntryPoint;
|
||||
|
@ -68,9 +68,9 @@ class Context {
|
|||
|
||||
[void] AddPowerShellProfileStatement([bool] $system, [string] $category, [string] $statement, [bool] $overwrite) {
|
||||
if ($system) {
|
||||
Add-PowerShellProfileStatement -System -Category $category -Statement $statement -Overwrite $overwrite;
|
||||
Add-PowerShellProfileStatement -System -Category $category -Script $statement -Overwrite:$overwrite;
|
||||
} else {
|
||||
Add-PowerShellProfileStatement -Category $category -Statement $statement -Overwrite $overwrite;
|
||||
Add-PowerShellProfileStatement -Category $category -Script $statement -Overwrite:$overwrite;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue