initial commit
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ife1391ed23a1e7f388b1b5eca90b9ea76a6a6964
This commit is contained in:
commit
ef28bdaeb4
63 changed files with 17292 additions and 0 deletions
27
build.rs
Normal file
27
build.rs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
use std::fs;
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
pub fn create_pakku_symlink() {
|
||||
let exe_path =
|
||||
std::env::current_exe().expect("Failed to get current exe path");
|
||||
let exe_dir = exe_path.parent().expect("Failed to get exe directory");
|
||||
let pakker_path = exe_dir.join("pakker");
|
||||
let pakku_path = exe_dir.join("pakku");
|
||||
|
||||
if pakker_path.exists() {
|
||||
if pakku_path.exists() {
|
||||
let _ = fs::remove_file(&pakku_path);
|
||||
}
|
||||
let _ = std::os::unix::fs::symlink(&pakker_path, &pakku_path);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
pub fn create_pakku_symlink() {
|
||||
// No-op on non-Unix systems
|
||||
println!("This only works on an Unix system! Skipping Pakku symlink.")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue