mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-11-16 07:48:11 +01:00
Update build.rs
This commit is contained in:
parent
f6c5f0aca9
commit
06971991cb
1 changed files with 9 additions and 14 deletions
23
build.rs
23
build.rs
|
@ -4,14 +4,14 @@ fn main() {
|
|||
|
||||
let xdg = xdg::BaseDirectories::with_prefix("pinnacle").unwrap();
|
||||
|
||||
let data_dir = xdg.create_data_directory("").unwrap();
|
||||
let proto_dir = xdg.place_data_file("protobuf").unwrap();
|
||||
let default_config_dir = xdg.place_data_file("default_config").unwrap();
|
||||
|
||||
let remove_protos = format!("rm -r {data_dir:?}/protobuf");
|
||||
let copy_protos = format!("cp -r ./api/protocol {data_dir:?}/protobuf");
|
||||
let remove_protos = format!("rm -r {proto_dir:?}");
|
||||
let copy_protos = format!("cp -r ./api/protocol {proto_dir:?}");
|
||||
|
||||
let remove_default_config = format!("rm -r {data_dir:?}/default_config");
|
||||
let copy_default_config =
|
||||
format!("cp -r ./api/lua/examples/default {data_dir:?}/default_config");
|
||||
let remove_default_config = format!("rm -r {default_config_dir:?}");
|
||||
let copy_default_config = format!("cp -r ./api/lua/examples/default {default_config_dir:?}");
|
||||
|
||||
std::process::Command::new("/bin/sh")
|
||||
.arg("-c")
|
||||
|
@ -45,17 +45,12 @@ fn main() {
|
|||
.wait()
|
||||
.unwrap();
|
||||
|
||||
std::process::Command::new("/bin/sh")
|
||||
.arg("install_libs.sh")
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait()
|
||||
.unwrap();
|
||||
|
||||
std::env::set_current_dir("api/lua").unwrap();
|
||||
std::process::Command::new("luarocks")
|
||||
.arg("make")
|
||||
.arg("--local")
|
||||
.spawn()
|
||||
.expect("Luarocks is not installed");
|
||||
.expect("Luarocks is not installed")
|
||||
.wait()
|
||||
.unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue