oops, added missing build.rs too

This commit is contained in:
rabite 2019-06-19 22:43:30 +02:00
parent 940c7d3bb8
commit 6060deb33d
1 changed files with 19 additions and 0 deletions

19
build.rs Normal file
View File

@ -0,0 +1,19 @@
use std::process::Command;
fn main() {
// rename so we can just extract this into config dir later
Command::new("cp")
.args("-a extra hunter".split(" "))
.status()
.expect("Can't create copy of extra directory");
// create archive that will be included in hunter binary
Command::new("tar")
.args("cfz config.tar.gz hunter".split(" "))
.status()
.expect("Failed to create archive of defualt config!");
// delete directory we just compressed
std::fs::remove_dir_all("hunter")
.expect("Couldn't delete temporary config directory \"hunter\"")
}