[F] 💢💢💢💢💢💢💢💢💢💢💢

This commit is contained in:
2025-08-21 09:52:03 -04:00
parent b58425badd
commit cf6b77a1b7
3 changed files with 5 additions and 11 deletions
Generated
+1 -1
View File
@@ -251,7 +251,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hyfetch"
version = "2.0.0-rc4"
version = "2.0.0-rc5"
dependencies = [
"aho-corasick",
"ansi_colours",
+1 -1
View File
@@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/*"]
[workspace.package]
version = "2.0.0-rc4"
version = "2.0.0-rc5"
authors = ["Azalea Gui <azalea@hydev.org>"]
edition = "2021"
rust-version = "1.75.0"
+2 -8
View File
@@ -25,19 +25,13 @@ impl AsciiDistro {
}
}
fn anything_that_exist(paths: &[&Path]) -> Option<PathBuf> {
paths.iter().copied().find(|p| p.exists()).map(Path::to_path_buf)
}
fn main() {
// Path hack to make file paths work in both workspace and manifest directory
let p_ws = PathBuf::from(env::var_os("CARGO_WORKSPACE_DIR").unwrap());
let p_mn = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
let dir = PathBuf::from(env::var_os("CARGO_WORKSPACE_DIR").unwrap_or_else(|| env::var_os("CARGO_MANIFEST_DIR").unwrap()));
let o = PathBuf::from(env::var_os("OUT_DIR").unwrap());
for file in &["neofetch", "hyfetch"] {
let src = anything_that_exist(&[&p_ws.join(file), &p_mn.join(file)])
.expect(&format!("{} not found in workspace or manifest directory", file));
let src = dir.join(file);
let dst = o.join(file);
println!("cargo:rerun-if-changed={}", src.display());