From 00fb5bf63d6bdff05a6ac2a6b160f7ed068c1a8f Mon Sep 17 00:00:00 2001 From: Jack Nash Date: Thu, 18 Jul 2024 07:33:43 +1000 Subject: [PATCH] revert: remove debug scripts in build.rs --- build.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/build.rs b/build.rs index 40b3674..ad0c99e 100644 --- a/build.rs +++ b/build.rs @@ -1,22 +1,5 @@ -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; use std::process::Command; -fn copy_dir_all(src: impl AsRef, dst: impl AsRef) -> std::io::Result<()> { - fs::create_dir_all(&dst)?; - for entry in fs::read_dir(src)? { - let entry = entry?; - let file_type = entry.file_type()?; - if file_type.is_dir() { - copy_dir_all(entry.path(), dst.as_ref().join(entry.file_name()))?; - } else { - fs::copy(entry.path(), dst.as_ref().join(entry.file_name()))?; - } - } - Ok(()) -} - fn main() { Command::new("npm") .arg("install") @@ -37,8 +20,4 @@ fn main() { if !output.status.success() { eprintln!("Error: {}", String::from_utf8_lossy(&output.stderr)); } - - let out_dir = env::var("OUT_DIR").unwrap(); - let dest_dir = PathBuf::from(out_dir).join("static"); - copy_dir_all("static", &dest_dir).unwrap(); }