Update pull-repo.ps1

This commit is contained in:
Markus Fleschutz 2022-01-12 15:18:50 +01:00
parent 609440022a
commit e8df5794cd

View File

@ -16,9 +16,9 @@
param([string]$RepoDir = "$PWD")
try {
"🢃 Pulling updates..."
$StopWatch = [system.diagnostics.stopwatch]::startNew()
"⏳ (1/3) Checking requirements... "
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
set-location "$RepoDir"
@ -29,9 +29,11 @@ try {
exit 0 # success
}
"⏳ (2/3) Pulling updates... "
& git pull --recurse-submodules --jobs=4
if ($lastExitCode -ne "0") { throw "'git pull' failed" }
"⏳ (3/3) Updating submodules... "
& git submodule update --init --recursive
if ($lastExitCode -ne "0") { throw "'git submodule update' failed" }