diff --git a/scripts/clone-repos.ps1 b/scripts/clone-repos.ps1 index 7eb1f64f..306fbfbf 100755 --- a/scripts/clone-repos.ps1 +++ b/scripts/clone-repos.ps1 @@ -7,8 +7,11 @@ Specifies the file path to the target directory (current working directory by default) .EXAMPLE PS> ./clone-repos C:\MyRepos + ⏳ (1) Searching for Git executable... git version 2.46.0.windows.1 + ⏳ (2) Reading data/popular-repos.csv... 29 repos + ⏳ (3) Checking target folder... πŸ“‚Repos + ⏳ (4/32) Cloning πŸ“‚base256 (dev tool) from git@github.com:fleschutz/talk2windows.git (shallow main branch)... ... - βœ”οΈ Cloned 29 additional Git repos into πŸ“‚MyRepos in 123s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -45,15 +48,15 @@ try { $step++ if (Test-Path "$targetDir/$folderName" -pathType container) { - "⏳ ($step/$($total + 3)) Skipping πŸ“‚$folderName ($category) - exists already..." + "⏳ ($step/$($total + 3)) Skipping πŸ“‚$folderName ($category): exists already" $skipped++ } elseif ($shallow -eq "yes") { - "⏳ ($step/$($total + 3)) Cloning πŸ“‚$folderName ($category, shallow $branch branch) from $URL..." + "⏳ ($step/$($total + 3)) Cloning πŸ“‚$folderName ($category) from $URL (shallow $branch branch)..." & 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" } $cloned++ } else { - "⏳ ($step/$($total + 3)) Cloning πŸ“‚$folderName ($category, full $branch branch) from $URL..." + "⏳ ($step/$($total + 3)) Cloning πŸ“‚$folderName ($category) from $URL (full $branch branch)..." & git clone --branch "$branch" --recurse-submodules "$URL" "$targetDir/$folderName" if ($lastExitCode -ne "0") { throw "'git clone --branch $branch $URL' failed with exit code $lastExitCode" } $clone++