.\" Automatically generated by Pandoc 3.1.3
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "RPMLUA" "8" "17 December 2021" "" ""
.hy
.SH NAME
.PP
rpmlua - RPM Lua interpreter
.SH SYNOPSIS
.PP
\f[B]rpmlua\f[R] [{\f[B]-e|--execute\f[R]}
\[lq]\f[B]STATEMENT\f[R]\[rq]] [{\f[B]-i|--interactive\f[R]}]
[\f[I]SCRIPT_FILE\f[R]] [arg1 \&...]
.SH DESCRIPTION
.PP
Run RPM internal Lua interpreter.
.PP
Note: indexes start at 1 in Lua, so the program name is at arg[1]
instead of the more customary index zero.
.TP
\f[B]-i|--interactive\f[R]
Run an interactive session after executing optional script or statement.
.TP
\f[B]\[en]opts=OPTSTRING\f[R]
Perform getopt(3) option processing on the passed arguments according to
OPTSTRING.
.TP
\f[B]-e|--execute\f[R]
Execute a Lua statement before executing optional script.
.SH EXAMPLES
.PP
Execute test.lua script file:
.RS
.PP
rpmlua test.lua
.RE
.PP
Execute args.lua script file with option processing:
.RS
.PP
rpmlua \[en]opts=ab:c args.lua \[en] 1 2 3 -c -b5
.RE
.PP
Execute single statement to compare rpm versions:
.RS
.PP
rpmlua -e \[lq]print(rpm.ver(`1.0') < rpm.ver(`2.0'))\[rq]
.RE
.PP
Run an interactive session:
.RS
.PP
rpmlua -i
.RE
.SH SEE ALSO
.PP
\f[B]lua\f[R](1), \f[B]popt\f[R](3), \f[B]getopt\f[R](3),
\f[B]rpm\f[R](8)
.PP
\f[B]http://www.rpm.org/ \f[R]
.SH AUTHORS
.IP
.nf
\f[C]
Panu Matilainen
\f[R]
.fi