wait for downloads before exiting
This commit is contained in:
parent
b0fe231388
commit
1cd77984d4
@ -181,12 +181,16 @@ fn download(map_list: Vec<u64>) -> BoxResult<()>{
|
||||
header.as_str(),
|
||||
"-O",
|
||||
];
|
||||
for map_id in map_list.iter() {
|
||||
let processes_result:Result<Vec<_>, _>=map_list.iter().map(|map_id|{
|
||||
std::process::Command::new("wget")
|
||||
.args(shared_args)
|
||||
.arg(format!("maps/unprocessed/{}.rbxm",map_id))
|
||||
.arg(format!("https://assetdelivery.roblox.com/v1/asset/?ID={}",map_id))
|
||||
.spawn()?;
|
||||
.spawn()
|
||||
}).collect();
|
||||
//naively wait for all because idk how to make an async progress bar lmao
|
||||
for mut child in processes_result?{
|
||||
child.wait()?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user