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
|
# 3. Download GIT REPO
|
||||||
|
$git_repo_update = $null
|
||||||
# Function to pull repository
|
# Function to pull repository
|
||||||
function Pull-Repository {
|
function Pull-Repository {
|
||||||
Set-Location $path_gitea_powershell_profile
|
Set-Location $path_gitea_powershell_profile
|
||||||
@ -49,11 +50,13 @@ function Pull-Repository {
|
|||||||
if ($git_tmp -match "(Your branch is up to date)") {
|
if ($git_tmp -match "(Your branch is up to date)") {
|
||||||
$git_tmp | ForEach-Object {
|
$git_tmp | ForEach-Object {
|
||||||
Write-Host $_ -ForegroundColor Green
|
Write-Host $_ -ForegroundColor Green
|
||||||
|
$git_repo_update = $false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$git_tmp | ForEach-Object {
|
$git_tmp | ForEach-Object {
|
||||||
Write-Host $_ -ForegroundColor Red
|
Write-Host $_ -ForegroundColor Red
|
||||||
}
|
}
|
||||||
|
$git_repo_update = $true
|
||||||
Pull-Repository
|
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
|
$found_functions = $found_functions | Sort-Object
|
||||||
|
|
||||||
for ($i = 0; $i -lt $found_functions.Count; $i++) {
|
for ($i = 0; $i -lt $found_functions.Count; $i++) {
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
# gitea.RdzeN.net
|
# gitea.RdzeN.net
|
||||||
# Reload $profile
|
# Reload $profile
|
||||||
function Reload-Profile {
|
function Reload-Profile {
|
||||||
Write-Host "Do you want to reload your PS profile?"
|
. $PROFILE
|
||||||
do {
|
|
||||||
$reload = Read-Host "Type [Y]es or [N]o"
|
|
||||||
} until (
|
|
||||||
$reload -in ("Y","N")
|
|
||||||
)
|
|
||||||
if ($reload -eq "Y") {
|
|
||||||
. $PROFILE
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user