1
Fork 0
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:
RGBCube 2024-03-08 14:06:33 +03:00
parent 4f14279e6c
commit 08032e38c7
No known key found for this signature in database

View file

@ -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!"
} }