summaryrefslogtreecommitdiff
path: root/functions/init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/init.sh')
-rwxr-xr-xfunctions/init.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/functions/init.sh b/functions/init.sh
index c050b495b..1fbbd9308 100755
--- a/functions/init.sh
+++ b/functions/init.sh
@@ -29,6 +29,16 @@ Init_config_data ()
Read_conffiles $(Common_config_files)
Prepare_config
+
+ # Apt v2.0.1 introduced color support, but it needs to be explicitly enabled.
+ # This is done here so that the injection of the option does not get stored in the config file.
+ if [ "${_COLOR_OUT}" = "true" ] && [ "${_COLOR_ERR}" = "true" ]; then
+ APT_OPTIONS="${APT_OPTIONS} -o APT::Color=true"
+ APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=true"
+ else
+ APT_OPTIONS="${APT_OPTIONS} -o APT::Color=false"
+ APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=false"
+ fi
}
# "Auto" script redirection.