cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 90366e3508ccaf9f2af1fbd4d0f5b1868e050f46
parent c210bbb19787096fd5ee619a82009f50fb2c8c5f
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri, 24 Jul 2020 17:55:17 +0300

cpt: remove color enabling/disabling for now

Diffstat:
Msrc/cpt-lib | 12+-----------
1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/cpt-lib b/src/cpt-lib @@ -1359,6 +1359,7 @@ pkg_updates(){ # If the download option is specified only download the outdated packages # and exit. + # shellcheck disable=2154 [ "$download_only" = 1 ] && { log "Only sources for the packages will be acquired" prompt || exit 0 @@ -1504,17 +1505,6 @@ main() { "${log_dir:=$cac_dir/logs}" \ "${bin_dir:=$cac_dir/bin}" - # Disable color escape sequences if running in a subshell. - # This behaviour can be changed by adding a CPT_COLOR - # variable to the environment. If it is set to 1 it will - # always enable color escapes, and if set to 0 it will - # always disable color escapes. - if [ "$CPT_COLOR" = 1 ]; then color=1 - elif [ "$CPT_COLOR" = 0 ] || ! [ -t 1 ]; then - log() { printf '%s %s %s\n' "${3:-->}" "$1" "$2" >&2 ;} - else color=1 - fi - } main "$@"