hostcat 0.2.0

UNIX Command Line tool to switch between Local Dns profiles
1
2
3
4
5
6
7
8
9
10
11
12
use std::{env, fs};

fn main() {
    let config_file = format!("{}/{}", env::home_dir().unwrap().to_str().unwrap(), ".hostcat");
    match fs::write(&config_file, "default localhost") {
        Err(e) => {
            println!("cargo:warning=Error creating default config file [{}] {}", &config_file, e.to_string());
            println!("cargo:warning=Manually create /etc/hostcat or specify one using -c. [hostcat help] for more info")
        }
        _ => {}
    }
}