Skip to content

Commit

Permalink
Place man file to OUT_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
Vahe Danielyan committed Jan 6, 2024
1 parent 93e3810 commit 9dffd6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use clap_mangen::Man;
use std::env;

include!("src/args.rs"); // Adjust the path to where your Cli struct is defined

fn main() {
let app = Args::command();
let mut file = File::create("dirdiff.1").expect("Could not create man page file");
let out_dir = std::path::PathBuf::from(env::var("OUT_DIR").unwrap());
let mut file = File::create(out_dir.join("dirdiff.1")).expect("Could not create man page file");
Man::new(app).render(&mut file).expect("Could not render man page");
}

0 comments on commit 9dffd6d

Please sign in to comment.