[Rpm-maint] [rpm-software-management/rpm] Add a man page for rpm macro processor (PR #3781)

Florian Festi notifications at github.com
Tue Jun 10 09:32:01 UTC 2025


@ffesti commented on this pull request.



> +```
+%[ "%{aa}" == "5" ? 1 : 2]
+```
+
+## Example 7. Define a parametric Lua macro
+Define *%range* Lua macro that takes two integers as arguments and
+expands to the catenation of the numbers in the range:
+
+```
+%define range() %{lua:
+    for i=math.tointeger(arg[1]),math.tointeger(arg[2]) do
+        print(i)
+    end
+}
+```
+

```
> %range 4 8
45678
```
May be this isn't that great of an example. may be add `.." "` to the print even if this appends an unwanted (?) whitespace at the end.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3781#pullrequestreview-2912717360
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3781/review/2912717360 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250610/41ffd643/attachment.htm>


More information about the Rpm-maint mailing list