aboutsummaryrefslogtreecommitdiff
path: root/src/archiver/raw.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2024-03-08 23:38:23 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2024-03-08 23:38:23 +0100
commit6352ebb0eb4cb83240c6d4998e0ef1375b041191 (patch)
tree3ade08c77c8ab403d3196f80fad5ed3034c3035b /src/archiver/raw.rs
parent60307a9a3a39dccf652c9d9b4348e44db1e67627 (diff)
Generate and archive blog, allow publishing
Diffstat (limited to 'src/archiver/raw.rs')
-rw-r--r--src/archiver/raw.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/archiver/raw.rs b/src/archiver/raw.rs
new file mode 100644
index 0000000..5099f2b
--- /dev/null
+++ b/src/archiver/raw.rs
@@ -0,0 +1,11 @@
+use std::io::Result;
+use std::path::PathBuf;
+use crate::template::TemplateContext;
+use crate::utils::recursively_copy;
+
+pub fn archive(archive_directory: &PathBuf, _: &PathBuf, target: &PathBuf, _: &TemplateContext) -> Result<()> {
+ if archive_directory.exists() {
+ return recursively_copy(archive_directory, target);
+ }
+ Ok(())
+}