diff --git a/updater/src/main.rs b/updater/src/main.rs index 493355c386..7b712424ea 100644 --- a/updater/src/main.rs +++ b/updater/src/main.rs @@ -7,7 +7,7 @@ use anyhow::{Context, Result}; use walkdir::WalkDir; use abstio::{DataPacks, Entry, Manifest}; -use abstutil::{prettyprint_usize, CmdArgs, Parallelism, Timer}; +use abstutil::{must_run_cmd, prettyprint_usize, CmdArgs, Parallelism, Timer}; use geom::Percent; const MD5_BUF_READ_SIZE: usize = 4096; @@ -227,20 +227,6 @@ fn md5sum(path: &str) -> (String, usize) { (format!("{:x}", context.compute()), uncompressed_size_bytes) } -fn must_run_cmd(cmd: &mut Command) { - println!("> Running {:?}", cmd); - match cmd.status() { - Ok(status) => { - if !status.success() { - panic!("{:?} failed", cmd); - } - } - Err(err) => { - panic!("Failed to run {:?}: {:?}", cmd, err); - } - } -} - fn rm(path: &str) { println!("> rm {}", path); match std::fs::remove_file(path) {