mirror of
https://github.com/nestriness/warp.git
synced 2025-12-14 02:45:37 +02:00
This works
This commit is contained in:
15
build.rs
Normal file
15
build.rs
Normal 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(())
|
||||
}
|
||||
Reference in New Issue
Block a user