aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-07-24 14:55:17 +0000
committermerakor <cem@ckyln.com>2020-07-24 14:55:17 +0000
commit462e6e23e51f8a3332827e5bd568885f5bfafcef (patch)
tree26b27af252c88bd0e280861043081723b7957920
parent65d8285f1663731068846ffb1c293a15da81fbb4 (diff)
downloadcpt-462e6e23e51f8a3332827e5bd568885f5bfafcef.tar.gz
cpt: remove color enabling/disabling for now
FossilOrigin-Name: 97e7368893869832bcc6b29d57005f0114c056ef48e6369ad3b1396f715ca588
-rw-r--r--src/cpt-lib12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/cpt-lib b/src/cpt-lib
index d3de070..eaf87cc 100644
--- 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 "$@"