From 44449c60a9eadc9568763eb3375f57937162730a Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Fri, 18 Nov 2022 17:23:43 +0100 Subject: [PATCH] Update fetch-repos.ps1 --- Scripts/fetch-repos.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Scripts/fetch-repos.ps1 b/Scripts/fetch-repos.ps1 index 7a328e37..b7fc4063 100755 --- a/Scripts/fetch-repos.ps1 +++ b/Scripts/fetch-repos.ps1 @@ -27,17 +27,16 @@ try { if (-not(Test-Path "$ParentDir" -pathType container)) { throw "Can't access folder: $ParentDir" } $Folders = (Get-ChildItem "$ParentDir" -attributes Directory) $NumFolders = $Folders.Count - Write-Host "$NumFolders subfolders" + Write-Host "$NumFolders subfolders found" - [int]$Step = 3 + [int]$Step = 2 foreach ($Folder in $Folders) { $FolderName = (Get-Item "$Folder").Name - Write-Host "⏳ ($Step/$($NumFolders + 2)) Fetching into 📂$FolderName..." -noNewline + $Step++ + Write-Host "⏳ ($Step/$($NumFolders + 2)) Fetching into 📂$FolderName... " -noNewline & git -C "$Folder" fetch --all --recurse-submodules --prune --prune-tags --force if ($lastExitCode -ne "0") { throw "'git fetch' in $Folder failed with exit code $lastExitCode" } - - $Step++ } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds "✔️ fetched $NumFolders Git repositories in $Elapsed sec."