]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- %banner fixes from AC-branch
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 23 Mar 2005 07:28:36 +0000 (07:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.194

rpm.macros

index 441ed23cb42e603ccdc0c747f0f901f47e5e603c..b249e289768c45eaa7f087fe2db2405a0d357fc1 100644 (file)
@@ -507,22 +507,25 @@ fi; \
 # banner support (useful in {pre,post}{,un} and triggers)
 #
 # Usage:
-#      %banner name [-a] [-e] [-n] [-tn]
+#      %banner name [-a] [-e] [-n] [-tn] <<EOF
 # the banner text, the banner text
-# the banner text, and following line HAVE TO BE:
-# EOF
+# the banner text, and following line
+#EOF
+# You can use any form of here-document, <<'EOF' <<-EOT will do.
+# NOTE: if your use "<<-EOF", then You can actually indent inside here-document.
+#
 # -a   - append to the banner
 # -e   - send to stderr instead of stdout
 # -n   - no show banner (overrides -t)
 # -t   - show only, if RPM_SCRIPTVERBOSITY >= n; default n=5
-%banner(a:e:n:t:)      \
+%banner(aent:) \
 RPM_SCRIPTVERBOSITY=5 \
 [ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm \
 if [ -x /usr/bin/banner.sh ]; then \
-       CMD="/usr/bin/banner.sh %{-e:--stderr} %{!-n:\`[ $RPM_SCRIPTVERBOSITY -ge %{-t:%{-t*}}%{!-t:5} ] && echo '-s'\`} %{!-a:-m}%{-a:-M} %1" \
+       CMD="/usr/bin/banner.sh %{-e:--stderr} %{!-n:$([ $RPM_SCRIPTVERBOSITY -ge %{-t:%{-t*}}%{!-t:5} ] && echo -s)} %{!-a:-m}%{-a:-M} %1" \
 else \
        CMD="cat%{-e: >&2}" \
 fi \
-$CMD << EOF \
+$CMD %2%{?3: %3} \
 %nil
 
This page took 0.068643 seconds and 4 git commands to generate.