modified: RdzeN-Profile.ps1

This commit is contained in:
Tomasz Kostrzewa 2024-03-05 18:28:46 +01:00
parent 2c28c05a0d
commit d607f3d6a8

View File

@ -23,10 +23,22 @@ if (-not (Test-Path $path_gitea_powershell_profile_functions )) {
if (-not (Get-ChildItem $path_gitea_powershell_profile_functions).count -gt 0) { if (-not (Get-ChildItem $path_gitea_powershell_profile_functions).count -gt 0) {
Set-Location $path_gitea Set-Location $path_gitea
$RepositoryURL = "https://gitea.rdzen.net/najlepszytomasz/PowerShell-Profile.git" $RepositoryURL = "https://gitea.rdzen.net/najlepszytomasz/PowerShell-Profile.git"
git clone $RepositoryURL -q Write-Host "Creating GIT clone for: $RepositoryURL" -ForegroundColor Yellow
try {
git clone $RepositoryURL -q
Write-Host "Success GIT clone for: $RepositoryURL" -ForegroundColor Green
} catch {
Write-Host "Error occured while GIT clone for: $RepositoryURL" -ForegroundColor Red
}
} else { } else {
Set-Location $path_gitea_powershell_profile Set-Location $path_gitea_powershell_profile
git pull -q Write-Host "Pulling GIT for: $RepositoryURL" -ForegroundColor Yellow
try {
git pull -q
Write-Host "Success GIT pull for: $RepositoryURL" -ForegroundColor Green
} catch {
Write-Host "Error occured while GIT pull for: $RepositoryURL" -ForegroundColor Red
}
} }
# 3. dot source functions. # 3. dot source functions.