This works

This commit is contained in:
Wanjohi
2023-11-24 15:10:47 +03:00
parent 0e5a06698f
commit a092a84ec6
53 changed files with 5769 additions and 38 deletions

15
build.rs Normal file
View File

@@ -0,0 +1,15 @@
include!("src/cli.rs");
use clap::CommandFactory;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let out_dir = std::path::PathBuf::from(
std::env::var_os("OUT_DIR").ok_or(std::io::Error::new(std::io::ErrorKind::NotFound, "OUT_DIR not found"))?,
);
let cmd = Config::command();
let man = clap_mangen::Man::new(cmd);
let mut buffer: Vec<u8> = Default::default();
man.render(&mut buffer)?;
std::fs::write(out_dir.join("moq-pub.1"), buffer)?;
Ok(())
}