diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-13 14:29:14 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-14 13:58:11 +0200 |
commit | 7e738636523b9f8c1d5895fd551852ff54ebf635 (patch) | |
tree | 99d9639c9927da397deb2b0862892ae24acb44c7 /gen_cmdline.sh | |
parent | gen_funcs.sh: Refactor setup_cache_dir() (diff) | |
download | genkernel-7e738636523b9f8c1d5895fd551852ff54ebf635.tar.gz genkernel-7e738636523b9f8c1d5895fd551852ff54ebf635.tar.bz2 genkernel-7e738636523b9f8c1d5895fd551852ff54ebf635.zip |
gen_funcs.sh: Refactor setColorVars()
- Renamed to set_color_vars()
- Use NOCOLOR variable
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_cmdline.sh')
-rwxr-xr-x | gen_cmdline.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 038058f..8e729fe 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -607,9 +607,15 @@ parse_cmdline() { print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}" ;; --color|--no-color) - USECOLOR=$(parse_optbool "$*") - print_info 2 "USECOLOR: ${USECOLOR}" - setColorVars + CMD_COLOR=$(parse_optbool "$*") + if isTrue "${CMD_COLOR}" + then + NOCOLOR=false + else + NOCOLOR=true + fi + print_info 2 "CMD_COLOR: ${CMD_COLOR}" + set_color_vars ;; --cleanup|--no-cleanup) CMD_CLEANUP=$(parse_optbool "$*") |