mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-07-07 16:06:50 +02:00
Updated clone-repos.ps1
This commit is contained in:
@ -45,15 +45,15 @@ try {
|
|||||||
$step++
|
$step++
|
||||||
|
|
||||||
if (Test-Path "$targetDir/$folderName" -pathType container) {
|
if (Test-Path "$targetDir/$folderName" -pathType container) {
|
||||||
"⏳ ($step/$($total + 3)) Skipping 📂$folderName - the $category exists already..."
|
"⏳ ($step/$($total + 3)) Skipping 📂$folderName ($category) - exists already..."
|
||||||
$skipped++
|
$skipped++
|
||||||
} elseif ($shallow -eq "yes") {
|
} elseif ($shallow -eq "yes") {
|
||||||
"⏳ ($step/$($total + 3)) Cloning into 📂$folderName (a $category, $branch branch, shallow)..."
|
"⏳ ($step/$($total + 3)) Cloning 📂$folderName ($category, shallow $branch branch) from $URL..."
|
||||||
& git clone --branch "$branch" --single-branch --recurse-submodules "$URL" "$targetDir/$folderName"
|
& git clone --branch "$branch" --single-branch --recurse-submodules "$URL" "$targetDir/$folderName"
|
||||||
if ($lastExitCode -ne "0") { throw "'git clone --branch $branch $URL' failed with exit code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "'git clone --branch $branch $URL' failed with exit code $lastExitCode" }
|
||||||
$cloned++
|
$cloned++
|
||||||
} else {
|
} else {
|
||||||
"⏳ ($step/$($total + 3)) Cloning into 📂$folderName (a $category, $branch branch, full history)..."
|
"⏳ ($step/$($total + 3)) Cloning 📂$folderName ($category, full $branch branch) from $URL..."
|
||||||
& git clone --branch "$branch" --recurse-submodules "$URL" "$targetDir/$folderName"
|
& git clone --branch "$branch" --recurse-submodules "$URL" "$targetDir/$folderName"
|
||||||
if ($lastExitCode -ne "0") { throw "'git clone --branch $branch $URL' failed with exit code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "'git clone --branch $branch $URL' failed with exit code $lastExitCode" }
|
||||||
$clone++
|
$clone++
|
||||||
|
Reference in New Issue
Block a user