1
0
mirror of https://github.com/jht5945/buildj.git synced 2025-12-29 02:10:04 +08:00

add verbose

This commit is contained in:
2019-08-08 00:41:57 +08:00
parent 853a237c7a
commit 438fcd66a6
2 changed files with 24 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
use std::env;
pub fn print_usage() {
print!(r#"
buildj ::: - print this message
@@ -12,3 +14,9 @@ buildj - run build, run assigned
"#);
}
pub fn is_verbose() -> bool {
match env::var("BUILDJ_VERBOSE") {
Err(_) => false,
Ok(v) => (v == "TRUE" || v == "true" || v == "1"),
}
}