[Rpm-maint] [rpm-software-management/rpm] Add a man page for rpm macro processor (PR #3781)
Panu Matilainen
notifications at github.com
Tue Jun 10 10:02:39 UTC 2025
@pmatilai commented on this pull request.
> +specified by *%myprog* with it's first argument and always passing
+the option *--some-opt* to it, and additionally the *--xtra* option
+if it received the *-x* option itself:
+
+```
+%define myhelper(x) %{myprog} --some-opt %{?-x:--xtra} %{1}
+```
+
+## Example 3. Define a macro utilizing shell expansion
+Define macro *%today* that expands to the current date in _YYMMDD_
+format by calling the *date*(1) shell utility.
+Note the 2nd *%* needed to escape the arguments to *date*(1):
+
+```
+%define today %(date +%%y%%m%%d)
+```
Well it demonstrates getting something from the shell. I don't see how the exact format makes any difference.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3781#discussion_r2137446446
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3781/review/2912820164 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250610/12b02fbe/attachment-0001.htm>
More information about the Rpm-maint
mailing list