]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- added stderr support for %%banner
authorpzurowski <pzurowski@pld-linux.org>
Wed, 24 Nov 2004 09:41:14 +0000 (09:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- req. macro rev. 1.176
- rel .4

Changed files:
    rpm.macros -> 1.176

rpm.macros

index 49bf992d78955c646031e4de80f67eadf4dd7565..7ecda9b1941680a8eb1ed8d4832c1b444938ca1e 100644 (file)
@@ -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
This page took 0.039098 seconds and 4 git commands to generate.