From 98fe5c6a6f8e671a2460446a16f27687af5dd85b Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Sun, 11 Nov 2012 00:00:54 +0100 Subject: [PATCH] autospec: deprecate the option '--colorize' Signed-off-by: Davide Madrisan --- ChangeLog | 4 ++++ autospec.in | 7 +++++-- conf/autospec.conf.in | 10 ++-------- po/it/autospec_fe.po | 6 ++++++ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa476eb..238b69a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,10 @@ Changes in version 1.14.2 * plugins/* - Davide Madrisan: The option '--colorize-theme' must set colorize to '1'. ++ update + * autospec - Davide Madrisan: + Deprecate the option '--colorize'. + ------------------------------------------------------------------------------- Changes in version 1.14.1 - _TO*Hacklab release diff --git a/autospec.in b/autospec.in index f986a08..6acd27e 100644 --- a/autospec.in +++ b/autospec.in @@ -127,7 +127,9 @@ while (($# > 0)); do -q|--quiet) let "verbose = 0" ;; -r|--colorize) - let "colorize = 1" ;; + let "colorize = 1" + notify.warning $"\ +deprecated option"" (-r|--colorize), "$"use \`--colorize-theme' instead" ;; --colorize-theme) read_arg colorize_theme "$@" || shift let "colorize = 1" ;; @@ -160,7 +162,8 @@ esac . @libdir@/libcfg.lib [ "$logging" = "1" ] && let "colorize = 0" -[ "$colorize" = "1" ] && notify.enable_colors || notify.disable_colors +[ "$colorize" = "1" ] && notify.enable_colors "$colorize_theme" \ + || notify.disable_colors # checking for errors in the configuration file [ "$config_getvar" = 1 ] || config.integrity diff --git a/conf/autospec.conf.in b/conf/autospec.conf.in index 534b863..193c2ed 100644 --- a/conf/autospec.conf.in +++ b/conf/autospec.conf.in @@ -34,7 +34,7 @@ spec_backup_extension="old" # Create "hidden" (default) or "visible" backup copies spec_backup_attr="hidden" -## Output using ascii colors (enabled by default) ----------------------------- +## Output using ascii or web colors (enabled by default) ---------------------- # Default colors are: # ESC=$(echo -en "\033") # CRIT="${ESC}[1;31m" (red) @@ -42,13 +42,7 @@ spec_backup_attr="hidden" # WARN="${ESC}[1;31m" # EXIT="${ESC}[1;31m" # NORM=$(echo -en "${ESC}[m\017") -# -# A possible setup for the web: -# CRIT="" -# NOTE="" -# WARN="" -# EXIT="$CRIT" -# NORM="" +# See the files: see /etc/@package@.d/color-theme.* colorize=1 ## Logging directory (default is /var/tmp/@package@) -------------------------- diff --git a/po/it/autospec_fe.po b/po/it/autospec_fe.po index 68a875f..2ed807f 100644 --- a/po/it/autospec_fe.po +++ b/po/it/autospec_fe.po @@ -76,6 +76,12 @@ msgstr "Segnalare eventuali bug a ." msgid "library not found" msgstr "libreria non trovata" +msgid "deprecated option" +msgstr "opzione deprecata" + +msgid "use \\`--colorize-theme' instead" +msgstr "utilizzare invece \\`--colorize-theme'" + msgid "version" msgstr "versione"