hostcat 0.3.0

UNIX Command Line tool to switch between Local Dns profiles
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::fs;

use crate::src::my_fs::validate_tilde;

mod src;

fn main() {
    let config_file = validate_tilde("~/.hostcat".to_string());
    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")
        }
        _ => {}
    }
}