Update build-repos.ps1, clone-repos.ps1, fetch-repos.ps1, and

pull-repos.ps1
This commit is contained in:
Markus Fleschutz
2022-08-18 09:46:16 +02:00
parent ddb6484a9d
commit 0cdf5ec9a1
4 changed files with 28 additions and 27 deletions

View File

@ -1,6 +1,6 @@
<#
.SYNOPSIS
Fetches updates for all Git repositories in a folder
Fetches updates for Git repositories
.DESCRIPTION
This PowerShell script fetches updates for all Git repositories in a folder (including submodules).
.PARAMETER ParentDir
@ -22,11 +22,12 @@ try {
& git --version
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
if (-not(Test-Path "$ParentDir" -pathType container)) { throw "Can't access directory: $ParentDir" }
$ParentDirName = (Get-Item "$ParentDir").Name
"⏳ Step 2 - Checking parent folder 📂$ParentDirName..."
if (-not(Test-Path "$ParentDir" -pathType container)) { throw "Can't access folder: $ParentDir" }
$Folders = (Get-ChildItem "$ParentDir" -attributes Directory)
$NumFolders = $Folders.Count
$ParentDirName = (Get-Item "$ParentDir").Name
"⏳ Step 2 - Found $NumFolders subfolders in 📂$ParentDirName..."
"Found $NumFolders subfolders."
[int]$Step = 3
foreach ($Folder in $Folders) {