mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-20 19:50:47 +01:00
Update clone-repos.ps1
This commit is contained in:
parent
460e8d402c
commit
6bb47eda65
@ -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"
|
|
|
29
Data/popular-repositories.csv
Normal file
29
Data/popular-repositories.csv
Normal 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",
|
|
@ -8,7 +8,7 @@
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./clone-repos C:\Repos
|
PS> ./clone-repos C:\Repos
|
||||||
⏳ (1) Searching for Git executable... git version 2.41.0.windows.3
|
⏳ (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
|
⏳ (3) Checking target folder... 📂repos
|
||||||
⏳ (4/32) Cloning into 📂base256unicode (dev tool)...
|
⏳ (4/32) Cloning into 📂base256unicode (dev tool)...
|
||||||
...
|
...
|
||||||
@ -27,8 +27,8 @@ try {
|
|||||||
& git --version
|
& git --version
|
||||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
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
|
Write-Host "⏳ (2) Reading Data/popular-repositories.csv... " -noNewline
|
||||||
$Table = Import-CSV "$PSScriptRoot/../Data/popular-git-repos.csv"
|
$Table = Import-CSV "$PSScriptRoot/../Data/popular-repositories.csv"
|
||||||
$NumEntries = $Table.count
|
$NumEntries = $Table.count
|
||||||
Write-Host "$NumEntries repos"
|
Write-Host "$NumEntries repos"
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ try {
|
|||||||
[string]$FolderName = $Row.FOLDERNAME
|
[string]$FolderName = $Row.FOLDERNAME
|
||||||
[string]$Category = $Row.CATEGORY
|
[string]$Category = $Row.CATEGORY
|
||||||
[string]$Branch = $Row.BRANCH
|
[string]$Branch = $Row.BRANCH
|
||||||
[string]$Full = $Row.FULL
|
[string]$Shallow = $Row.SHALLOW
|
||||||
[string]$URL = $Row.URL
|
[string]$URL = $Row.URL
|
||||||
$Step++
|
$Step++
|
||||||
|
|
||||||
@ -52,14 +52,14 @@ try {
|
|||||||
$Skipped++
|
$Skipped++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if ($Full -eq "yes") {
|
if ($Shallow -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 {
|
|
||||||
"⏳ ($Step/$($NumEntries + 4)) Cloning into 📂$FolderName ($Category) - $Branch branch only..."
|
"⏳ ($Step/$($NumEntries + 4)) Cloning into 📂$FolderName ($Category) - $Branch branch only..."
|
||||||
& 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" }
|
||||||
|
} 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++
|
$Cloned++
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user