Merge commit '98ed962c7d3eebe12c97588e61245273d265e72f' into master
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::utils::{remove_file, run_command};
|
||||
use crate::utils::{get_sysroot_dir, remove_file, run_command};
|
||||
|
||||
use std::fs::remove_dir_all;
|
||||
use std::path::Path;
|
||||
@@ -42,11 +42,12 @@ fn usage() {
|
||||
}
|
||||
|
||||
fn clean_all() -> Result<(), String> {
|
||||
let build_sysroot = get_sysroot_dir();
|
||||
let dirs_to_remove = [
|
||||
"target",
|
||||
"build_sysroot/sysroot",
|
||||
"build_sysroot/sysroot_src",
|
||||
"build_sysroot/target",
|
||||
"target".into(),
|
||||
build_sysroot.join("sysroot"),
|
||||
build_sysroot.join("sysroot_src"),
|
||||
build_sysroot.join("target"),
|
||||
];
|
||||
for dir in dirs_to_remove {
|
||||
let _ = remove_dir_all(dir);
|
||||
@@ -56,10 +57,11 @@ fn clean_all() -> Result<(), String> {
|
||||
let _ = remove_dir_all(Path::new(crate::BUILD_DIR).join(dir));
|
||||
}
|
||||
|
||||
let files_to_remove = ["build_sysroot/Cargo.lock", "perf.data", "perf.data.old"];
|
||||
let files_to_remove =
|
||||
[build_sysroot.join("Cargo.lock"), "perf.data".into(), "perf.data.old".into()];
|
||||
|
||||
for file in files_to_remove {
|
||||
let _ = remove_file(file);
|
||||
let _ = remove_file(&file);
|
||||
}
|
||||
|
||||
println!("Successfully ran `clean all`");
|
||||
|
||||
Reference in New Issue
Block a user