PowerShell/Scripts/clone-repos.ps1

25 lines
874 B
PowerShell
Raw Normal View History

2020-12-01 12:24:56 +01:00
#!/snap/bin/powershell
2020-12-29 15:14:21 +01:00
<#
.SYNTAX ./clone-repos.ps1
.DESCRIPTION clones well-known Git repositories into the current directory.
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
2020-12-01 12:24:56 +01:00
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-25 11:30:43 +01:00
write-output "Done."
2020-12-09 10:30:55 +01:00
exit 0
} catch {
2020-12-25 11:30:43 +01:00
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
2020-12-09 10:30:55 +01:00
exit 1
}