mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-16 06:58:18 +02:00
Improve output of clone-repos.ps1
This commit is contained in:
parent
ee93d55dc1
commit
0317186fc7
@ -21,13 +21,13 @@ try {
|
||||
[int]$Count = 0
|
||||
foreach($Row in $Table) {
|
||||
$URL = $Row.URL
|
||||
$Directory = $Row.Directory
|
||||
if (Test-Path "$ParentDir/$Directory") {
|
||||
"Skipping 📂$Directory (exists already) ..."
|
||||
$DirName = $Row.Directory
|
||||
if (test-path "$ParentDir/$DirName" -pathType container) {
|
||||
"Skipping 📂$DirName - it exists already ..."
|
||||
continue
|
||||
}
|
||||
"⏳ Cloning $URL..."
|
||||
& git clone --recurse-submodules "$URL" "$ParentDir/$Directory"
|
||||
"⏳ Cloning $URL to 📂$DirName..."
|
||||
& git clone --recurse-submodules "$URL" "$ParentDir/$DirName"
|
||||
if ($lastExitCode -ne "0") { throw "'git clone $URL' failed" }
|
||||
$Count++
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user