summaryrefslogtreecommitdiffstats
path: root/build.rs
blob: 07f1acb266a469257beca2312e1bcde4f9659b40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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\"")
}