mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-20 00:48:17 +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
|
[int]$Count = 0
|
||||||
foreach($Row in $Table) {
|
foreach($Row in $Table) {
|
||||||
$URL = $Row.URL
|
$URL = $Row.URL
|
||||||
$Directory = $Row.Directory
|
$DirName = $Row.Directory
|
||||||
if (Test-Path "$ParentDir/$Directory") {
|
if (test-path "$ParentDir/$DirName" -pathType container) {
|
||||||
"Skipping 📂$Directory (exists already) ..."
|
"Skipping 📂$DirName - it exists already ..."
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
"⏳ Cloning $URL..."
|
"⏳ Cloning $URL to 📂$DirName..."
|
||||||
& git clone --recurse-submodules "$URL" "$ParentDir/$Directory"
|
& git clone --recurse-submodules "$URL" "$ParentDir/$DirName"
|
||||||
if ($lastExitCode -ne "0") { throw "'git clone $URL' failed" }
|
if ($lastExitCode -ne "0") { throw "'git clone $URL' failed" }
|
||||||
$Count++
|
$Count++
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user