modified: RdzeN-Profile.ps1

modified:   functions/Override-Profile.ps1
	modified:   functions/Reload-Profile.ps1
	modified:   functions/Test-Profile.ps1
This commit is contained in:
Tomasz Kostrzewa 2024-03-05 19:17:58 +01:00
parent 0010dd1979
commit 94499ff700
4 changed files with 6 additions and 29 deletions

View File

@ -45,29 +45,9 @@ Get-ChildItem $path_gitea_powershell_profile_functions | ForEach-Object {
. $_.FullName
}
# 96. Update Profile Section:
if (-not (Test-Path $PROFILE)) {
# 97. Test Profile
Test-Profile
} else {
# 98. Override Profile
do {
New-SimulateTyping "Do you want to Override your PS Profile?"
$reload = Read-Host "Type [Y]es or [N]o"
} until (
$reload -in ("Y","N")
)
if ($reload -eq "Y") {
Override-Profile
}
}
# 97. Test Profile
Test-Profile
# 98. Override Profile
Override-Profile
# 99. Reload Profile
do {
New-SimulateTyping "Do you want to Reload your PS Profile?"
$reload = Read-Host "Type [Y]es or [N]o"
} until (
$reload -in ("Y","N")
)
if ($reload -eq "Y") {
Reload-Profile
}
Reload-Profile

View File

@ -3,6 +3,5 @@
function Override-Profile {
if ((Test-Path $PROFILE)) {
Get-Content "$path_gitea_powershell_profile\RdzeN-Profile.ps1" | Set-Content $PROFILE -Force
New-SimulateTyping "Your PowerShell profile was Override!"
}
}

View File

@ -3,4 +3,3 @@
function Reload-Profile {
. $PROFILE
}
New-SimulateTyping "Your PowerShell profile was Reloaded!"

View File

@ -3,6 +3,5 @@
function Test-Profile {
if (-not (Test-Path $PROFILE)) {
Copy-Item -Path "$path_gitea_powershell_profile\RdzeN-Profile.ps1" -Destination $PROFILE -force
New-SimulateTyping "Your PowerShell profile was created!"
}
}