mirror of
https://github.com/RGBCube/random-scripts
synced 2025-05-14 02:54:58 +00:00
Use par-each
This commit is contained in:
parent
4f14279e6c
commit
08032e38c7
1 changed files with 3 additions and 8 deletions
|
@ -9,17 +9,12 @@ def main [
|
||||||
} else if not ($user | is-empty) {
|
} else if not ($user | is-empty) {
|
||||||
"users/" + $user
|
"users/" + $user
|
||||||
} else {
|
} else {
|
||||||
""
|
print --stderr $"(ansi red)error:(ansi reset) either org or user must be supplied"
|
||||||
}
|
|
||||||
|
|
||||||
if ($path | is-empty) {
|
|
||||||
echo $"(ansi red)error:(ansi reset) either org or user must be supplied"
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Couldn't get parallel to work correctly so whatever.
|
|
||||||
http get https://api.github.com/($path)/repos
|
http get https://api.github.com/($path)/repos
|
||||||
| each { git clone $"https://github.com/($in.full_name)" }
|
| par-each { git clone $"https://github.com/($in.full_name)" }
|
||||||
|
|
||||||
print "\nDone!"
|
print --stderr "\nDone!"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue