mirror of
https://github.com/RGBCube/random-scripts
synced 2025-05-14 11:04:59 +00:00
20 lines
461 B
Text
Executable file
20 lines
461 B
Text
Executable file
#!/usr/bin/env nu
|
|
|
|
def main [
|
|
--org (-o): string = ""
|
|
--user (-u): string = ""
|
|
] {
|
|
let path = if not ($org | is-empty) {
|
|
"orgs/" + $org
|
|
} else if not ($user | is-empty) {
|
|
"users/" + $user
|
|
} else {
|
|
print --stderr $"(ansi red)error:(ansi reset) either org or user must be supplied"
|
|
exit 1
|
|
}
|
|
|
|
http get https://api.github.com/($path)/repos
|
|
| par-each { git clone $"https://github.com/($in.full_name)" }
|
|
|
|
print --stderr "\nDone!"
|
|
}
|