plugins/*: Execute 'notify.disable_colors()' when 'colorize' is set to '0' (disabled) to ignore color redefinitions made by user

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-11-09 22:57:36 +01:00
parent 5e90d9edb5
commit b5a1a17876
5 changed files with 6 additions and 6 deletions

View File

@ -131,7 +131,7 @@ esac
. @libdir@/libcfg.lib . @libdir@/libcfg.lib
[ "$logging" = "1" ] && let "colorize = 0" [ "$logging" = "1" ] && let "colorize = 0"
[ "$colorize" = "1" ] && notify.enable_colors [ "$colorize" = "1" ] && notify.enable_colors || notify.disable_colors
notify.debug "[${me[0]}, "$"version"" ${me[1]}]" notify.debug "[${me[0]}, "$"version"" ${me[1]}]"

View File

@ -131,7 +131,7 @@ for arg in $@; do
notify.error $"unrecognized option"" -- \`$arg'" notify.error $"unrecognized option"" -- \`$arg'"
done done
[ "$colorize" = "1" ] && notify.enable_colors [ "$colorize" = "1" ] && notify.enable_colors || notify.disable_colors
# config.getvar() # config.getvar()
# Parameters: # Parameters:

View File

@ -137,7 +137,7 @@ for arg in $@; do
notify.error $"unrecognized option"" -- \`$arg'" notify.error $"unrecognized option"" -- \`$arg'"
done done
[ "$colorize" = "1" ] && notify.enable_colors [ "$colorize" = "1" ] && notify.enable_colors || notify.disable_colors
# s_rpm_pck : the name of the srpm package (local or remote) # s_rpm_pck : the name of the srpm package (local or remote)
# (i.e. /usr/src/RPM/SRPMS/automake-1.9-1qilnx.src.rpm) # (i.e. /usr/src/RPM/SRPMS/automake-1.9-1qilnx.src.rpm)

View File

@ -310,7 +310,7 @@ fi
[ "$logging" = "1" ] && let "colorize = 0" [ "$logging" = "1" ] && let "colorize = 0"
[ "$colorize" = "1" ] && notify.enable_colors [ "$colorize" = "1" ] && notify.enable_colors || notify.disable_colors
# default values for non mandatory configuration variables # default values for non mandatory configuration variables
[ "$logging_dir" ] || logging_dir="${tmppath_dir:-/var/tmp}/@package@" [ "$logging_dir" ] || logging_dir="${tmppath_dir:-/var/tmp}/@package@"

View File

@ -207,12 +207,12 @@ while :; do
shift shift
done done
[ "$colorize" = "1" ] && notify.enable_colors || notify.disable_colors
for arg in $@; do for arg in $@; do
notify.error $"unrecognized option"" -- \`$arg'" notify.error $"unrecognized option"" -- \`$arg'"
done done
[ "$colorize" = "1" ] && notify.enable_colors
function specfile.ckeck_defvalues() { function specfile.ckeck_defvalues() {
# $1: name of the specfile # $1: name of the specfile
local specfile="$1" currvalue local specfile="$1" currvalue