From 1d89f237dbc0c8513c2919cde52f9f3904bcab22 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Tue, 7 Apr 2026 15:39:12 +0000 Subject: [PATCH] [F] Fix build --- crates/hyfetch/build.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/crates/hyfetch/build.rs b/crates/hyfetch/build.rs index 3fc78e53..34cc145d 100644 --- a/crates/hyfetch/build.rs +++ b/crates/hyfetch/build.rs @@ -53,15 +53,24 @@ fn main() -> Result<()> { &dir.join("../../hyfetch/data"), ]).context("couldn't find hyfetch/data")?; - let dst_data = o.join("hyfetch/data"); - fs::create_dir_all(&dst_data)?; + let dst_root = o.join("hyfetch"); + fs::create_dir_all(&dst_root)?; // Copy hyfetch/data let opt = CopyOptions { overwrite: true, copy_inside: true, ..CopyOptions::default() }; - fs_extra::dir::copy(&data_dir, &dst_data, &opt)?; + fs_extra::dir::copy(&data_dir, &dst_root, &opt)?; + + // Copy neofetch + let neofetch_src = anything_that_exist(&[ + &dir.join("neofetch"), + &dir.join("../../neofetch"), + ]).context("couldn't find neofetch")?; + fs::copy(&neofetch_src, o.join("neofetch"))?; preset_codegen(&o.join("hyfetch/data/presets.json"), &o.join("presets.rs"))?; - export_distros(&data_dir.join("distros"), &o)?; + + let distros_dir = data_dir.join("distros"); + export_distros(&distros_dir, &o)?; Ok(()) }