Improve clone-repos.ps1

This commit is contained in:
Markus Fleschutz 2021-06-28 20:58:37 +02:00
parent 63e8cc3d42
commit 8cd8bfc1cd
2 changed files with 29 additions and 27 deletions

View File

@ -1,21 +1,22 @@
Directory,Branch,URL
base256unicode, master, "https://github.com/fleschutz/base256unicode"
bazel, master, "https://github.com/bazelbuild/bazel"
cmake, master, "https://github.com/Kitware/CMake"
cmatrix, master, "https://github.com/abishekvashok/cmatrix"
cmark, master, "https://github.com/commonmark/cmark"
CWTS, master, "https://github.com/fleschutz/CWTS"
elasticsearch, master, "https://github.com/elastic/elasticsearch"
grafana, master, "https://github.com/grafana/grafana"
llvm, master, "https://github.com/llvm/llvm-project"
ninja, master, "git://github.com/ninja-build/ninja.git"
opencv, master, "https://github.com/opencv/opencv"
OSMA, master, "https://github.com/fleschutz/OSMA"
PowerShell, master, "https://github.com/fleschutz/PowerShell"
LSS, master, "https://github.com/fleschutz/LSS"
protobuf, master, "https://github.com/protocolbuffers/protobuf"
smartmontools, master, "https://github.com/smartmontools/smartmontools"
tensorflow, master, "https://github.com/tensorflow/tensorflow"
tinycc, master, "https://github.com/TinyCC/tinycc"
voice2json, master, "https://github.com/synesthesiam/voice2json"
zfs, master, "https://github.com/openzfs/zfs"
AppName,FolderName,BranchName,URL
B256U, base256unicode, master, "https://github.com/fleschutz/base256unicode"
Bazel, bazel, master, "https://github.com/bazelbuild/bazel"
CMake, cmake, master, "https://github.com/Kitware/CMake"
CMatrix, cmatrix, master, "https://github.com/abishekvashok/cmatrix"
CMark, cmark, master, "https://github.com/commonmark/cmark"
CWTS, CWTS, master, "https://github.com/fleschutz/CWTS"
ElasticSearch, elasticsearch, master, "https://github.com/elastic/elasticsearch"
Grafana, grafana, master, "https://github.com/grafana/grafana"
LLVM, llvm, master, "https://github.com/llvm/llvm-project"
Ninja, ninja, master, "git://github.com/ninja-build/ninja.git"
OpenCV, opencv, master, "https://github.com/opencv/opencv"
OSMA, OSMA, master, "https://github.com/fleschutz/OSMA"
PowerShell, PowerShell, master, "https://github.com/fleschutz/PowerShell"
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"
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) {
$Directory = $Row.Directory
$Branch = $Row.Branch
$FolderName = $Row.FolderName
$BranchName = $Row.BranchName
$URL = $Row.URL
if (test-path "$ParentDir/$Directory" -pathType container) {
"📂$Directory exists already, skipping..."
if (test-path "$ParentDir/$FolderName" -pathType container) {
"📂$FolderName exists already, skipping..."
continue
}
"🢃 Cloning 📂$Directory from $URL, $Branch branch..."
& git clone --branch "$Branch" --recurse-submodules "$URL" "$ParentDir/$Directory"
"🢃 Cloning 📂$FolderName from $URL, $BranchName branch..."
& git clone --branch "$BranchName" --recurse-submodules "$URL" "$ParentDir/$FolderName"
if ($lastExitCode -ne "0") { throw "'git clone $URL' failed" }
$Count++
}