Updated pull-repos.ps1

This commit is contained in:
Markus Fleschutz 2024-02-29 08:23:27 +01:00
parent edd15f6ebe
commit a88ee6031a

View File

@ -7,7 +7,7 @@
Specifies the path to the parent folder Specifies the path to the parent folder
.EXAMPLE .EXAMPLE
PS> ./pull-repos C:\MyRepos PS> ./pull-repos C:\MyRepos
(1) Searching for Git executable... git version 2.42.0 (1) Searching for Git executable... git version 2.43.0
(2) Checking parent folder... 33 subfolders (2) Checking parent folder... 33 subfolders
(3/35) Pulling into 📂base256unicode... (3/35) Pulling into 📂base256unicode...
... ...
@ -47,8 +47,13 @@ try {
$step++ $step++
} }
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds [int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✔️ Pulled updates into $numFolders repos under 📂$parentDirName in $elapsed sec ($failed failed)" if ($failed -eq 0) {
exit 0 # success "✔️ Pulled updates into $numFolders repos under 📂$parentDirName in $elapsed sec."
exit 0 # success
} else {
"⚠️ Pulled updates into $numFolders repos under 📂$parentDirName but $failed failed (took $elapsed sec)."
exit 1
}
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1 exit 1