modified: RdzeN-Profile.ps1
modified: functions/Reload-Profile.ps1
This commit is contained in:
parent
0283dd79ac
commit
66efa30528
@ -35,6 +35,7 @@ try {
|
||||
}
|
||||
|
||||
# 3. Download GIT REPO
|
||||
$git_repo_update = $null
|
||||
# Function to pull repository
|
||||
function Pull-Repository {
|
||||
Set-Location $path_gitea_powershell_profile
|
||||
@ -49,11 +50,13 @@ function Pull-Repository {
|
||||
if ($git_tmp -match "(Your branch is up to date)") {
|
||||
$git_tmp | ForEach-Object {
|
||||
Write-Host $_ -ForegroundColor Green
|
||||
$git_repo_update = $false
|
||||
}
|
||||
} else {
|
||||
$git_tmp | ForEach-Object {
|
||||
Write-Host $_ -ForegroundColor Red
|
||||
}
|
||||
$git_repo_update = $true
|
||||
Pull-Repository
|
||||
}
|
||||
|
||||
@ -69,6 +72,11 @@ Get-ChildItem $path_to_search | ForEach-Object {
|
||||
}
|
||||
}
|
||||
|
||||
if ($git_repo_update -eq $true) {
|
||||
Override-Profile
|
||||
Reload-Profile
|
||||
}
|
||||
|
||||
$found_functions = $found_functions | Sort-Object
|
||||
|
||||
for ($i = 0; $i -lt $found_functions.Count; $i++) {
|
||||
|
@ -1,13 +1,5 @@
|
||||
# gitea.RdzeN.net
|
||||
# Reload $profile
|
||||
function Reload-Profile {
|
||||
Write-Host "Do you want to reload your PS profile?"
|
||||
do {
|
||||
$reload = Read-Host "Type [Y]es or [N]o"
|
||||
} until (
|
||||
$reload -in ("Y","N")
|
||||
)
|
||||
if ($reload -eq "Y") {
|
||||
. $PROFILE
|
||||
}
|
||||
. $PROFILE
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user