Improve clone-repos.ps1

This commit is contained in:
Markus Fleschutz 2021-06-28 21:24:10 +02:00
parent 8cd8bfc1cd
commit 0cfa90aabc
2 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@ LSS, LSS, master, "https://github.com/fleschutz/LSS"
ProtoBuf, protobuf, master, "https://github.com/protocolbuffers/protobuf"
SmartMonTools, smartmontools, master, "https://github.com/smartmontools/smartmontools"
Tensorflow, tensorflow, master, "https://github.com/tensorflow/tensorflow"
Terminal, terminal, master, "https://github.com/microsoft/terminal"
Windows Terminal,terminal, main, "https://github.com/microsoft/terminal"
TinyCC, tinycc, master, "https://github.com/TinyCC/tinycc"
Voice2Json, voice2json, master, "https://github.com/synesthesiam/voice2json"
ZFS, zfs, master, "https://github.com/openzfs/zfs"

Can't render this file because it has a wrong number of fields in line 2.

View File

@ -19,15 +19,16 @@ try {
[int]$Count = 0
foreach($Row in $Table) {
$AppName = $Row.AppName
$FolderName = $Row.FolderName
$BranchName = $Row.BranchName
$URL = $Row.URL
if (test-path "$ParentDir/$FolderName" -pathType container) {
"📂$FolderName exists already, skipping..."
"📂$FolderName for $AppName exists already, skipping..."
continue
}
"🢃 Cloning 📂$FolderName from $URL, $BranchName branch..."
"🢃 Cloning $AppName into 📂$FolderName, $BranchName branch..."
& git clone --branch "$BranchName" --recurse-submodules "$URL" "$ParentDir/$FolderName"
if ($lastExitCode -ne "0") { throw "'git clone $URL' failed" }
$Count++