Update clone-repos.ps1

This commit is contained in:
Markus Fleschutz 2022-08-29 13:03:53 +02:00
parent a2c111e453
commit a6405ce64d

View File

@ -22,16 +22,17 @@ try {
& git --version & git --version
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
"⏳ Step 2 - Checking target folder..." "⏳ Step 2 - Loading database table in Data/git-repos.csv..."
if (-not(Test-Path "$FolderPath" -pathType container)) { throw "Can't access directory: $FolderPath" }
$ParentFolderName = (Get-Item "$FolderPath").Name
"⏳ Step 3 - Checking table in Data/git-repos.csv..."
$Table = Import-CSV "$PSScriptRoot/../Data/git-repos.csv" $Table = Import-CSV "$PSScriptRoot/../Data/git-repos.csv"
$NumEntries = $Table.count $NumEntries = $Table.count
"Found $NumEntries entries." "Found $NumEntries entries."
[int]$Step = 4 $ParentFolderName = (Get-Item "$FolderPath").Name
"⏳ Step 3 - Checking folder 📂$ParentFolderName..."
if (-not(Test-Path "$FolderPath" -pathType container)) { throw "Can't access directory: $FolderPath" }
[int]$Step = 3
[int]$Cloned = 0 [int]$Cloned = 0
[int]$Skipped = 0 [int]$Skipped = 0
foreach($Row in $Table) { foreach($Row in $Table) {