From f012228245a452b4b26974f26c287c9095009105 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Fri, 2 Jul 2021 15:25:25 +0200 Subject: [PATCH] Improve make-repos.ps1 --- Scripts/make-repos.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Scripts/make-repos.ps1 b/Scripts/make-repos.ps1 index 6c2f3a24..e677576e 100755 --- a/Scripts/make-repos.ps1 +++ b/Scripts/make-repos.ps1 @@ -13,15 +13,18 @@ try { if (-not(test-path "$ParentDir" -pathType container)) { throw "Can't access directory: $ParentDir" } $Folders = (get-childItem "$ParentDir" -attributes Directory) + $FolderCount = $Folders.Count $ParentDirName = (get-item "$ParentDir").Name - "Building $($Folders.Count) Git repositories at 📂$ParentDirName..." + "Found $FolderCount subfolders in 📂$ParentDirName..." + [int]$Step = 1 foreach ($Folder in $Folders) { & "$PSScriptRoot/make-repo.ps1" "$Folder" + $Step++ } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ built $($Folders.Count) Git repositories at 📂$ParentDirName in $Elapsed sec" + "✔️ built $FolderCount Git repositories at 📂$ParentDirName in $Elapsed sec" exit 0 } catch { write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"