pinnacle/build.rs
Ottatop 0c4fc3ad1d Start on new example config
TODO: write the docs, fix input keysym reading, make a luarocks module
2024-01-12 21:48:07 -06:00

28 lines
747 B
Rust

fn main() {
println!("cargo:rerun-if-changed=api/lua");
println!("cargo:rerun-if-changed=api/protocol");
let xdg = xdg::BaseDirectories::with_prefix("pinnacle").unwrap();
let data_dir = xdg.create_data_directory("").unwrap();
let copy_protos = format!("cp -r ./api/protocol {data_dir:?}/protobuf");
let copy_lua = format!("cp -r ./api/lua_grpc {data_dir:?}");
std::process::Command::new("/bin/sh")
.arg("-c")
.arg(&copy_protos)
.spawn()
.unwrap();
std::process::Command::new("/bin/sh")
.arg("-c")
.arg(&copy_lua)
.spawn()
.unwrap();
std::process::Command::new("/bin/sh")
.arg("install_libs.sh")
.spawn()
.unwrap();
}