From 4432fbcee01a3e78fc3ff176077a8f784ae8317f Mon Sep 17 00:00:00 2001 From: Vika Date: Thu, 2 Jan 2025 13:52:19 +0300 Subject: Vendor fonts into Kittybox These fonts are licensed under OFL 1.1, which means I can freely redistribute them. Ain't that nice? Change-Id: Ide32286305680865652db17c8d482b5ac0f20a50 --- templates/build.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'templates/build.rs') diff --git a/templates/build.rs b/templates/build.rs index ac77059..5a62855 100644 --- a/templates/build.rs +++ b/templates/build.rs @@ -25,14 +25,18 @@ fn main() -> Result<(), std::io::Error> { let mut assets = WalkDir::new(assets_path) .into_iter(); while let Some(Ok(entry)) = assets.next() { + eprintln!("Processing {}", entry.path().display()); + let out_path = out_dir.join(entry.path().strip_prefix(assets_path).unwrap()); if entry.file_type().is_dir() { - if let Err(err) = std::fs::create_dir(&out_dir.join(entry.path())) { + eprintln!("Creating directory {}", &out_path.display()); + if let Err(err) = std::fs::create_dir(&out_path) { if err.kind() != std::io::ErrorKind::AlreadyExists { return Err(err) } } } else { - std::fs::copy(entry.path(), &out_dir.join(entry.path().strip_prefix(assets_path).unwrap()))?; + eprintln!("Copying {} to {}", entry.path().display(), out_path.display()); + std::fs::copy(entry.path(), &out_path)?; } } -- cgit 1.4.1