diff --git a/Scripts/fetch-repos.ps1 b/Scripts/fetch-repos.ps1 index f842d40f..34b5c68b 100755 --- a/Scripts/fetch-repos.ps1 +++ b/Scripts/fetch-repos.ps1 @@ -22,12 +22,12 @@ try { & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - $ParentDirName = (Get-Item "$ParentDir").Name - Write-Host "⏳ (2) Checking parent folder 📂$ParentDirName... " -noNewline + Write-Host "⏳ (2) Checking parent folder... " -noNewline if (-not(Test-Path "$ParentDir" -pathType container)) { throw "Can't access folder: $ParentDir" } + $ParentDirName = (Get-Item "$ParentDir").Name $Folders = (Get-ChildItem "$ParentDir" -attributes Directory) $NumFolders = $Folders.Count - Write-Host "$NumFolders subfolders found" + Write-Host "$NumFolders subfolders" [int]$Step = 2 foreach ($Folder in $Folders) { @@ -39,7 +39,7 @@ try { if ($lastExitCode -ne "0") { throw "'git fetch' in $Folder failed with exit code $lastExitCode" } } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ fetched $NumFolders Git repositories in $Elapsed sec." + "✔️ fetched $NumFolders Git repositories in 📂$ParentDirName in $Elapsed sec." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/pull-repos.ps1 b/Scripts/pull-repos.ps1 index a4611761..6cc71556 100755 --- a/Scripts/pull-repos.ps1 +++ b/Scripts/pull-repos.ps1 @@ -27,7 +27,7 @@ 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 "found $NumFolders subfolders" + Write-Host "$NumFolders subfolders" [int]$Step = 3 [int]$Failed = 0