modified: RdzeN-Profile.ps1
modified: functions/Override-Profile.ps1 modified: functions/Reload-Profile.ps1 modified: functions/Test-Profile.ps1
This commit is contained in:
parent
0010dd1979
commit
94499ff700
@ -45,29 +45,9 @@ Get-ChildItem $path_gitea_powershell_profile_functions | ForEach-Object {
|
|||||||
. $_.FullName
|
. $_.FullName
|
||||||
}
|
}
|
||||||
|
|
||||||
# 96. Update Profile Section:
|
# 97. Test Profile
|
||||||
if (-not (Test-Path $PROFILE)) {
|
Test-Profile
|
||||||
# 97. Test Profile
|
# 98. Override Profile
|
||||||
Test-Profile
|
Override-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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# 99. Reload Profile
|
# 99. Reload Profile
|
||||||
do {
|
Reload-Profile
|
||||||
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
|
|
||||||
}
|
|
@ -3,6 +3,5 @@
|
|||||||
function Override-Profile {
|
function Override-Profile {
|
||||||
if ((Test-Path $PROFILE)) {
|
if ((Test-Path $PROFILE)) {
|
||||||
Get-Content "$path_gitea_powershell_profile\RdzeN-Profile.ps1" | Set-Content $PROFILE -Force
|
Get-Content "$path_gitea_powershell_profile\RdzeN-Profile.ps1" | Set-Content $PROFILE -Force
|
||||||
New-SimulateTyping "Your PowerShell profile was Override!"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,5 +2,4 @@
|
|||||||
# Reload $profile
|
# Reload $profile
|
||||||
function Reload-Profile {
|
function Reload-Profile {
|
||||||
. $PROFILE
|
. $PROFILE
|
||||||
}
|
}
|
||||||
New-SimulateTyping "Your PowerShell profile was Reloaded!"
|
|
@ -3,6 +3,5 @@
|
|||||||
function Test-Profile {
|
function Test-Profile {
|
||||||
if (-not (Test-Path $PROFILE)) {
|
if (-not (Test-Path $PROFILE)) {
|
||||||
Copy-Item -Path "$path_gitea_powershell_profile\RdzeN-Profile.ps1" -Destination $PROFILE -force
|
Copy-Item -Path "$path_gitea_powershell_profile\RdzeN-Profile.ps1" -Destination $PROFILE -force
|
||||||
New-SimulateTyping "Your PowerShell profile was created!"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user