mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Add 'pvinfo' a tool to display the information of enabled flags, and print the debug information in Yaml and Human format. Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Serena Santosh <serena@linux.ibm.com> Signed-off-by: Ann Mariya Jojo <annjojo@linux.ibm.com> Signed-off-by: Annu Sharma <annu09@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
27 lines
735 B
Rust
27 lines
735 B
Rust
// SPDX-License-Identifier: MIT
|
|
//
|
|
// Copyright IBM Corp. 2024
|
|
// it under the terms of the MIT license. See LICENSE for details.
|
|
#![allow(missing_docs)]
|
|
|
|
use clap::CommandFactory;
|
|
use clap_complete::{generate_to, Shell};
|
|
use std::env;
|
|
use std::io::Error;
|
|
|
|
include!("src/cli.rs");
|
|
|
|
fn main() -> Result<(), Error> {
|
|
let outdir = env::var_os("OUT_DIR").unwrap();
|
|
let crate_name = env!("CARGO_PKG_NAME");
|
|
let mut cmd = CliOptions::command();
|
|
for &shell in Shell::value_variants() {
|
|
generate_to(shell, &mut cmd, crate_name, &outdir)?;
|
|
}
|
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
println!("cargo:rerun-if-changed=src/cli.rs");
|
|
println!("cargo:rerun-if-changed=../utils/src/cli.rs");
|
|
Ok(())
|
|
}
|