summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-06-19 22:43:30 +0200
committerrabite <rabite@posteo.de>2019-06-19 22:43:30 +0200
commit6060deb33de72ab6099e86b2c1e432f31c21c59c (patch)
treeacb8eab6fa972abba48efed253cabd1418d4ac3a
parent940c7d3bb89a716bed40baffd6adacaa2d433070 (diff)
oops, added missing build.rs too
-rw-r--r--build.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/build.rs b/build.rs
new file mode 100644
index 0000000..07f1acb
--- /dev/null
+++ b/build.rs
@@ -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\"")
+}