mirror of https://codeberg.org/topola/topola.git
manpage: changed the folder to man
This commit is contained in:
parent
fdb50aeab9
commit
0f10a35193
11
build.rs
11
build.rs
|
|
@ -1,11 +1,14 @@
|
||||||
include!("src/bin/topola/cli.rs");
|
include!("src/bin/topola/cli.rs");
|
||||||
use clap_mangen::Man;
|
use clap_mangen::Man;
|
||||||
use clap::CommandFactory;
|
use clap::CommandFactory;
|
||||||
use std::fs::File;
|
use std::fs::{File, create_dir_all};
|
||||||
|
// https://rust-cli.github.io/book/in-depth/docs.html
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let cli = Cli::command();
|
let cmd = Cli::command();
|
||||||
let man = Man::new(cli);
|
let man = Man::new(cmd);
|
||||||
let mut file = File::create(concat!("assets", "/topola.1"))?;
|
let folder = "man";
|
||||||
|
create_dir_all(folder)?;
|
||||||
|
let mut file = File::create(format!("{}/topola.1", folder))?;
|
||||||
man.render(&mut file)?;
|
man.render(&mut file)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue