mtos-pm 0.1.0

Hybrid package manager for every platform Rust supports
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


fn main() -> std::io::Result<()> {
    let out_dir = std::path::PathBuf::from(std::env::var_os("OUT_DIR").ok_or(std::io::ErrorKind::NotFound)?);

    let cmd = clap::Command::new("pm")
        .arg(clap::arg!(-i --insfile <INS>))
        .arg(clap::arg!(-c --cfgfile <CFG>))
        .arg(clap::arg!(-b --build   <BFL>));

    let man = clap_mangen::Man::new(cmd);
    let mut buffer: Vec<u8> = Default::default();
    man.render(&mut buffer)?;

    std::fs::write(out_dir.join("pm.1"), buffer)?;

    Ok(())
}