summaryrefslogtreecommitdiff
path: root/docs/man
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2021-12-17 14:03:35 +0200
committerPanu Matilainen <pmatilai@redhat.com>2021-12-17 14:57:14 +0200
commitbf58cfd08f344872d30082c123a0035429d51742 (patch)
tree378d638002142004feb422c6698079dbf3e3a6a2 /docs/man
parent67280003444e25e42bbc97170e9b12a5d7fb1cc6 (diff)
downloadrpm-bf58cfd08f344872d30082c123a0035429d51742.tar.gz
Add rpmlua wrapper command for running our Lua interpreter standalone
Being able to run stuff easily in rpm context helps developing and debugging scriptlets and macros too. Supports running one-liner statements from the cli, regular scripts and an interactive session. This is placed into a separate executable for, well, separation and simplicity, but it'll also give us means to link to readline without dragging that to main rpm dependencies (but that's left for later).
Diffstat (limited to 'docs/man')
-rw-r--r--docs/man/Makefile.am3
-rw-r--r--docs/man/rpmlua.8.md70
2 files changed, 72 insertions, 1 deletions
diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am
index 7695586e8..216b85bcd 100644
--- a/docs/man/Makefile.am
+++ b/docs/man/Makefile.am
@@ -9,10 +9,11 @@ EXTRA_DIST += gendiff.1.md
man_man8dir = $(mandir)/man8
man_man8_DATA = rpm.8 rpm-misc.8 rpmbuild.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8
-man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8
+man_man8_DATA += rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 rpmlua.8
EXTRA_DIST += rpm.8.md rpm-misc.8.md rpmbuild.8.md rpmdeps.8.md rpmgraph.8.md
EXTRA_DIST += rpm2cpio.8.md rpmdb.8.md rpmkeys.8.md rpmsign.8.md rpmspec.8.md
+EXTRA_DIST += rpmlua.8.md
# Package generated man pages
EXTRA_DIST += $(man_man1_DATA)
diff --git a/docs/man/rpmlua.8.md b/docs/man/rpmlua.8.md
new file mode 100644
index 000000000..52210bd27
--- /dev/null
+++ b/docs/man/rpmlua.8.md
@@ -0,0 +1,70 @@
+---
+date: 17 December 2021
+section: 8
+title: RPMLUA
+---
+
+NAME
+====
+
+rpmlua - RPM Lua interpreter
+
+SYNOPSIS
+========
+
+**rpmlua** {**-i\|\--interactive**} \[*SCRIPT_FILE* \[arg1 ...\]\]
+**rpmlua** \[**--opts=OPTSTRING**\] *SCRIPT_FILE* \[arg1 ...\]
+**rpmlua** {**-e\|\--execute**} "**STATEMENT**" \[arg1 ...\]
+
+DESCRIPTION
+===========
+
+Run RPM internal Lua interpreter.
+
+**-i\|\--interactive**
+
+: Run an interactive session after executing optional script or statement.
+
+**--opts=OPTSTRING**
+
+: Perform getopt(3) option processing on the passed arguments according
+ to OPTSTRING.
+
+**-e\|\--execute**
+
+: Execute a Lua statement.
+
+EXAMPLES
+========
+
+Execute test.lua script file:
+
+> rpmlua test.lua
+
+Execute args.lua script file with option processing:
+
+> rpmlua --opts=ab:c args.lua -- 1 2 3 -c -b5
+
+Execute single statement to compare rpm versions:
+
+> rpmlua -e "print(rpm.ver('1.0') < rpm.ver('2.0'))"
+
+Run an interactive session:
+
+> rpmlua -i
+
+SEE ALSO
+========
+
+ lua(1)
+ popt(3),
+ getopt(3),
+ rpm(8),
+
+
+**http://www.rpm.org/ \<URL:http://www.rpm.org/\>**
+
+AUTHORS
+=======
+
+ Panu Matilainen <pmatilai@redhat.com>