2020-12-01 12:24:56 +01:00
|
|
|
#!/snap/bin/powershell
|
|
|
|
|
|
|
|
# Syntax: ./clone-repos.ps1
|
2020-12-08 13:36:22 +01:00
|
|
|
# Description: clones well-known Git repositories into the current directory.
|
2020-12-01 12:24:56 +01:00
|
|
|
# Author: Markus Fleschutz
|
|
|
|
# Source: github.com/fleschutz/PowerShell
|
|
|
|
# License: CC0
|
|
|
|
|
2020-12-08 13:36:22 +01:00
|
|
|
$Repos = "https://github.com/commonmark/cmark", "https://github.com/opencv/opencv", "https://github.com/openzfs/zfs", "https://github.com/synesthesiam/voice2json", "https://github.com/fleschutz/CWTS", "https://github.com/fleschutz/cubesum", "https://github.com/fleschutz/PowerShell","https://github.com/fleschutz/CWTS", "https://github.com/fleschutz/eventdriven"
|
2020-12-01 12:24:56 +01:00
|
|
|
|
2020-12-09 10:30:55 +01:00
|
|
|
try {
|
|
|
|
foreach ($Repo in $Repos) {
|
|
|
|
$Answer = read-host "Do you want to clone $Repo (y/n)"
|
|
|
|
if ($Answer -eq "y") {
|
|
|
|
git clone $Repo
|
|
|
|
}
|
2020-12-01 12:24:56 +01:00
|
|
|
}
|
|
|
|
|
2020-12-09 10:30:55 +01:00
|
|
|
write-host "Done."
|
|
|
|
exit 0
|
|
|
|
} catch {
|
|
|
|
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
|
|
exit 1
|
|
|
|
}
|