Update clone-repos.ps1

This commit is contained in:
Markus Fleschutz 2023-08-10 11:06:59 +02:00
parent 460e8d402c
commit 6bb47eda65
3 changed files with 38 additions and 38 deletions

View File

@ -1,29 +0,0 @@
FOLDERNAME, CATEGORY, BRANCH, FULL, URL
base256unicode, dev tool, main, no, "git@github.com:fleschutz/base256unicode.git"
bazel, build tool, master, no, "git@github.com:bazelbuild/bazel.git"
cmake, build tool, master, no, "git@github.com:Kitware/CMake.git"
cmatrix, CLI fun, master, no, "git@github.com:abishekvashok/cmatrix.git"
cmark, tool, master, no, "git@github.com:commonmark/cmark.git"
CWTS, dev tool, main, no, "git@github.com:fleschutz/CWTS.git"
elasticsearch, search tool, main, no, "git@github.com:elastic/elasticsearch.git"
kubo, file sharing tool, master, no, "git@github.com:ipfs/kubo.git"
grafana, visualization tool, main, no, "git@github.com:grafana/grafana.git"
jhead, EXIF tool, master, no, "git@github.com:Matthias-Wandel/jhead"
leon, personal assistant, master, no, "git@github.com:leon-ai/leon.git"
llvm, compiler, main, no, "git@github.com:llvm/llvm-project.git"
LSS, math tool, main, no, "git@github.com:fleschutz/LSS.git"
ninja, build tool, master, no, "git@github.com:ninja-build/ninja.git"
opencv, lib, master, no, "git@github.com:opencv/opencv.git"
operating-systems, collection, main, no, "git@github.com:fleschutz/operating-systems.git"
papers, collection, main, no, "git@github.com:fleschutz/papers.git"
PowerShell, collection, master, no, "git@github.com:fleschutz/PowerShell.git"
pwsh, shell, master, no, "git@github.com:PowerShell/PowerShell.git"
protobuf, dev, main, no, "git@github.com:protocolbuffers/protobuf.git"
rust, compiler, master, no, "git@github.com:rust-lang/rust.git"
smartmontools, SSD/HDD tool, master, no, "git@github.com:smartmontools/smartmontools.git"
talk2windows, tool, main, no, "git@github.com:fleschutz/talk2windows.git"
tensorflow, tool, master, no, "git@github.com:tensorflow/tensorflow.git"
terminal, desktop tool, main, no, "git@github.com:microsoft/terminal.git"
tinycc, compiler, mob, no, "git@github.com:TinyCC/tinycc.git"
voice2json, tool, master, no, "git@github.com:synesthesiam/voice2json.git"
zfs, tool, master, no, "git@github.com:openzfs/zfs.git"
1 FOLDERNAME CATEGORY BRANCH FULL URL
2 base256unicode dev tool main no git@github.com:fleschutz/base256unicode.git
3 bazel build tool master no git@github.com:bazelbuild/bazel.git
4 cmake build tool master no git@github.com:Kitware/CMake.git
5 cmatrix CLI fun master no git@github.com:abishekvashok/cmatrix.git
6 cmark tool master no git@github.com:commonmark/cmark.git
7 CWTS dev tool main no git@github.com:fleschutz/CWTS.git
8 elasticsearch search tool main no git@github.com:elastic/elasticsearch.git
9 kubo file sharing tool master no git@github.com:ipfs/kubo.git
10 grafana visualization tool main no git@github.com:grafana/grafana.git
11 jhead EXIF tool master no git@github.com:Matthias-Wandel/jhead
12 leon personal assistant master no git@github.com:leon-ai/leon.git
13 llvm compiler main no git@github.com:llvm/llvm-project.git
14 LSS math tool main no git@github.com:fleschutz/LSS.git
15 ninja build tool master no git@github.com:ninja-build/ninja.git
16 opencv lib master no git@github.com:opencv/opencv.git
17 operating-systems collection main no git@github.com:fleschutz/operating-systems.git
18 papers collection main no git@github.com:fleschutz/papers.git
19 PowerShell collection master no git@github.com:fleschutz/PowerShell.git
20 pwsh shell master no git@github.com:PowerShell/PowerShell.git
21 protobuf dev main no git@github.com:protocolbuffers/protobuf.git
22 rust compiler master no git@github.com:rust-lang/rust.git
23 smartmontools SSD/HDD tool master no git@github.com:smartmontools/smartmontools.git
24 talk2windows tool main no git@github.com:fleschutz/talk2windows.git
25 tensorflow tool master no git@github.com:tensorflow/tensorflow.git
26 terminal desktop tool main no git@github.com:microsoft/terminal.git
27 tinycc compiler mob no git@github.com:TinyCC/tinycc.git
28 voice2json tool master no git@github.com:synesthesiam/voice2json.git
29 zfs tool master no git@github.com:openzfs/zfs.git

View File

@ -0,0 +1,29 @@
FOLDERNAME, CATEGORY, BRANCH, SHALLOW, URL,
base256unicode, dev tool, main, yes, "git@github.com:fleschutz/base256unicode.git",
bazel, build tool, master, yes, "git@github.com:bazelbuild/bazel.git",
cmake, build tool, master, yes, "git@github.com:Kitware/CMake.git",
cmatrix, CLI fun, master, yes, "git@github.com:abishekvashok/cmatrix.git",
cmark, tool, master, yes, "git@github.com:commonmark/cmark.git",
CWTS, dev tool, main, yes, "git@github.com:fleschutz/CWTS.git",
elasticsearch, search tool, main, yes, "git@github.com:elastic/elasticsearch.git",
kubo, file sharing tool, master, yes, "git@github.com:ipfs/kubo.git",
grafana, visualization tool, main, yes, "git@github.com:grafana/grafana.git",
jhead, EXIF tool, master, yes, "git@github.com:Matthias-Wandel/jhead",
leon, personal assistant, master, yes, "git@github.com:leon-ai/leon.git",
llvm, compiler, main, yes, "git@github.com:llvm/llvm-project.git",
LSS, math tool, main, yes, "git@github.com:fleschutz/LSS.git",
ninja, build tool, master, yes, "git@github.com:ninja-build/ninja.git",
opencv, lib, master, yes, "git@github.com:opencv/opencv.git",
operating-systems, collection, main, yes, "git@github.com:fleschutz/operating-systems.git",
papers, collection, main, yes, "git@github.com:fleschutz/papers.git",
PowerShell, collection, master, yes, "git@github.com:fleschutz/PowerShell.git",
pwsh, shell, master, yes, "git@github.com:PowerShell/PowerShell.git",
protobuf, dev, main, yes, "git@github.com:protocolbuffers/protobuf.git",
rust, compiler, master, yes, "git@github.com:rust-lang/rust.git",
smartmontools, SSD/HDD tool, master, yes, "git@github.com:smartmontools/smartmontools.git",
talk2windows, tool, main, yes, "git@github.com:fleschutz/talk2windows.git",
tensorflow, tool, master, yes, "git@github.com:tensorflow/tensorflow.git",
terminal, desktop tool, main, yes, "git@github.com:microsoft/terminal.git",
tinycc, compiler, mob, yes, "git@github.com:TinyCC/tinycc.git",
voice2json, tool, master, yes, "git@github.com:synesthesiam/voice2json.git",
zfs, tool, master, yes, "git@github.com:openzfs/zfs.git",
1 FOLDERNAME CATEGORY BRANCH SHALLOW URL
2 base256unicode dev tool main yes git@github.com:fleschutz/base256unicode.git
3 bazel build tool master yes git@github.com:bazelbuild/bazel.git
4 cmake build tool master yes git@github.com:Kitware/CMake.git
5 cmatrix CLI fun master yes git@github.com:abishekvashok/cmatrix.git
6 cmark tool master yes git@github.com:commonmark/cmark.git
7 CWTS dev tool main yes git@github.com:fleschutz/CWTS.git
8 elasticsearch search tool main yes git@github.com:elastic/elasticsearch.git
9 kubo file sharing tool master yes git@github.com:ipfs/kubo.git
10 grafana visualization tool main yes git@github.com:grafana/grafana.git
11 jhead EXIF tool master yes git@github.com:Matthias-Wandel/jhead
12 leon personal assistant master yes git@github.com:leon-ai/leon.git
13 llvm compiler main yes git@github.com:llvm/llvm-project.git
14 LSS math tool main yes git@github.com:fleschutz/LSS.git
15 ninja build tool master yes git@github.com:ninja-build/ninja.git
16 opencv lib master yes git@github.com:opencv/opencv.git
17 operating-systems collection main yes git@github.com:fleschutz/operating-systems.git
18 papers collection main yes git@github.com:fleschutz/papers.git
19 PowerShell collection master yes git@github.com:fleschutz/PowerShell.git
20 pwsh shell master yes git@github.com:PowerShell/PowerShell.git
21 protobuf dev main yes git@github.com:protocolbuffers/protobuf.git
22 rust compiler master yes git@github.com:rust-lang/rust.git
23 smartmontools SSD/HDD tool master yes git@github.com:smartmontools/smartmontools.git
24 talk2windows tool main yes git@github.com:fleschutz/talk2windows.git
25 tensorflow tool master yes git@github.com:tensorflow/tensorflow.git
26 terminal desktop tool main yes git@github.com:microsoft/terminal.git
27 tinycc compiler mob yes git@github.com:TinyCC/tinycc.git
28 voice2json tool master yes git@github.com:synesthesiam/voice2json.git
29 zfs tool master yes git@github.com:openzfs/zfs.git

View File

@ -8,7 +8,7 @@
.EXAMPLE
PS> ./clone-repos C:\Repos
(1) Searching for Git executable... git version 2.41.0.windows.3
(2) Loading Data/popular-git-repos.csv... 28 repos
(2) Reading Data/popular-repositories.csv... 28 repos
(3) Checking target folder... 📂repos
(4/32) Cloning into 📂base256unicode (dev tool)...
...
@ -27,8 +27,8 @@ try {
& git --version
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
Write-Host "⏳ (2) Loading Data/popular-git-repos.csv... " -noNewline
$Table = Import-CSV "$PSScriptRoot/../Data/popular-git-repos.csv"
Write-Host "⏳ (2) Reading Data/popular-repositories.csv... " -noNewline
$Table = Import-CSV "$PSScriptRoot/../Data/popular-repositories.csv"
$NumEntries = $Table.count
Write-Host "$NumEntries repos"
@ -43,7 +43,7 @@ try {
[string]$FolderName = $Row.FOLDERNAME
[string]$Category = $Row.CATEGORY
[string]$Branch = $Row.BRANCH
[string]$Full = $Row.FULL
[string]$Shallow = $Row.SHALLOW
[string]$URL = $Row.URL
$Step++
@ -52,14 +52,14 @@ try {
$Skipped++
continue
}
if ($Full -eq "yes") {
"⏳ ($Step/$($NumEntries + 4)) Cloning into 📂$FolderName ($Category) - $Branch branch with full history..."
& git clone --branch "$Branch" --recurse-submodules "$URL" "$TargetDir/$FolderName"
if ($lastExitCode -ne "0") { throw "'git clone --branch $Branch $URL' failed with exit code $lastExitCode" }
} else {
if ($Shallow -eq "yes") {
"⏳ ($Step/$($NumEntries + 4)) Cloning into 📂$FolderName ($Category) - $Branch branch only..."
& 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" }
} else {
"⏳ ($Step/$($NumEntries + 4)) Cloning into 📂$FolderName ($Category) - $Branch branch with full history..."
& git clone --branch "$Branch" --recurse-submodules "$URL" "$TargetDir/$FolderName"
if ($lastExitCode -ne "0") { throw "'git clone --branch $Branch $URL' failed with exit code $lastExitCode" }
}
$Cloned++
}