about summary refs log tree commit diff
path: root/templates/build.rs
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2025-01-02 13:52:19 +0300
committerVika <vika@fireburn.ru>2025-01-02 13:52:19 +0300
commit4432fbcee01a3e78fc3ff176077a8f784ae8317f (patch)
tree07ea9ab24c808c89392b80422ba1d3816393854b /templates/build.rs
parent95e00e79726f4c29230cf9e39c76ea15ad9adf46 (diff)
downloadkittybox-4432fbcee01a3e78fc3ff176077a8f784ae8317f.tar.zst
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
Diffstat (limited to 'templates/build.rs')
-rw-r--r--templates/build.rs8
1 files changed, 6 insertions, 2 deletions
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)?;
         }
     }