write_file: Do not overwrite with same content

The `write_file` function will no longer overwrite existing files if the
content has not changed.  This will ensure file metadata timestamps are
accurate, and reduce unnecessary filesystem activity.
This commit is contained in:
2024-01-18 19:46:25 -06:00
parent e5403dbc66
commit 1099fa40c7
3 changed files with 41 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ edition = "2021"
argparse = "0.2.2"
blake2 = "0.10.6"
file-mode = { version = "0.1.2", features = ["serde"] }
hex = "0.4.3"
pwd-grp = "0.1.1"
serde = { version = "1.0.195", features = ["derive"] }
serde_yaml = "0.9.30"