pxar bin: rust fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -20,9 +20,7 @@ fn pxar_create_and_extract() {
|
||||
.arg("./tests/archive.pxar")
|
||||
.arg(src_dir)
|
||||
.status()
|
||||
.unwrap_or_else(|err| {
|
||||
panic!("Failed to invoke '{}': {}", exec_path, err)
|
||||
});
|
||||
.unwrap_or_else(|err| panic!("Failed to invoke '{}': {}", exec_path, err));
|
||||
|
||||
println!("run '{} extract archive.pxar {}'", exec_path, dest_dir);
|
||||
|
||||
@ -32,13 +30,14 @@ fn pxar_create_and_extract() {
|
||||
.arg("--target")
|
||||
.arg(dest_dir)
|
||||
.status()
|
||||
.unwrap_or_else(|err| {
|
||||
panic!("Failed to invoke '{}': {}", exec_path, err)
|
||||
});
|
||||
.unwrap_or_else(|err| panic!("Failed to invoke '{}': {}", exec_path, err));
|
||||
|
||||
println!("run 'rsync --dry-run --itemize-changes --archive {} {}' to verify'", src_dir, dest_dir);
|
||||
println!(
|
||||
"run 'rsync --dry-run --itemize-changes --archive {} {}' to verify'",
|
||||
src_dir, dest_dir
|
||||
);
|
||||
/* Use rsync with --dry-run and --itemize-changes to compare
|
||||
src_dir and dest_dir */
|
||||
src_dir and dest_dir */
|
||||
let stdout = Command::new("rsync")
|
||||
.arg("--dry-run")
|
||||
.arg("--itemize-changes")
|
||||
@ -64,18 +63,14 @@ fn pxar_create_and_extract() {
|
||||
Command::new("rm")
|
||||
.arg("./tests/archive.pxar")
|
||||
.status()
|
||||
.unwrap_or_else(|err| {
|
||||
panic!("Failed to invoke 'rm': {}", err)
|
||||
});
|
||||
.unwrap_or_else(|err| panic!("Failed to invoke 'rm': {}", err));
|
||||
|
||||
// Cleanup destination dir
|
||||
Command::new("rm")
|
||||
.arg("-r")
|
||||
.arg(dest_dir)
|
||||
.status()
|
||||
.unwrap_or_else(|err| {
|
||||
panic!("Failed to invoke 'rm': {}", err)
|
||||
});
|
||||
.unwrap_or_else(|err| panic!("Failed to invoke 'rm': {}", err));
|
||||
|
||||
// If source and destination folder contain the same content,
|
||||
// the output of the rsync invokation should yield no lines.
|
||||
|
Reference in New Issue
Block a user