.\" Automatically generated by Pandoc 3.1.11.1
.\"
.TH "RPMLUA" "8" "17 December 2021" "" ""
.SH NAME
rpmlua \- RPM Lua interpreter
.SH SYNOPSIS
\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
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 \f[B]getopt\f[R](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
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
\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
.EX
Panu Matilainen
.EE