X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm.macros;h=7ecda9b1941680a8eb1ed8d4832c1b444938ca1e;hb=fb0333264557db79c4c97e1a738425c4cb4275aa;hp=49bf992d78955c646031e4de80f67eadf4dd7565;hpb=f1bbc6ff615aee1f68ae6e20dd474af361d453db;p=packages%2Frpm.git diff --git a/rpm.macros b/rpm.macros index 49bf992..7ecda9b 100644 --- a/rpm.macros +++ b/rpm.macros @@ -487,20 +487,21 @@ fi; \ # banner support (useful in {pre,post}{,un} and triggers) # # Usage: -# %banner name [-a] [-n] [-tn] +# %banner name [-a] [-e] [-n] [-tn] # the banner text, the banner text # the banner text, and following line HAVE TO BE: # EOF # -a - append to the banner +# -e - send to stderr instead of stdout # -n - no show banner (overriden by -t) # -t - show only, if RPM_SCRIPTVERBOSITY >= n -%banner(a:n:t:) \ +%banner(a:e:n:t:) \ RPM_SCRIPTVERBOSITY=5 \ [ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm \ if [ -x /usr/bin/banner.sh ]; then \ - CMD="/usr/bin/banner.sh %{!-t:%{!-n:-s}} %{-t:\`[ $RPM_SCRIPTVERBOSITY -ge %{-t*} ] && echo '-s'\`} %{!-a:-m}%{-a:-M} %1" \ + CMD="/usr/bin/banner.sh %{-e:--stderr} %{!-t:%{!-n:-s}} %{-t:\`[ $RPM_SCRIPTVERBOSITY -ge %{-t*} ] && echo '-s'\`} %{!-a:-m}%{-a:-M} %1" \ else \ - CMD="cat" \ + CMD="cat%{-e: >&2}" \ fi \ $CMD << EOF \ %nil