Debian Codegraph @

upstream/debian-trixie/man8/rpmlua.8

raw
1 .\" Automatically generated by Pandoc 3.1.11.1
2 .\"
3 .TH "RPMLUA" "8" "17 December 2021" "" ""
4 .SH NAME
5 rpmlua \- RPM Lua interpreter
6 .SH SYNOPSIS
7 \f[B]rpmlua\f[R] [{\f[B]\-e|\-\-execute\f[R]}
8 \[lq]\f[B]STATEMENT\f[R]\[rq]] [{\f[B]\-i|\-\-interactive\f[R]}]
9 [\f[I]SCRIPT_FILE\f[R]] [arg1 \&...]
10 .SH DESCRIPTION
11 Run RPM internal Lua interpreter.
12 .PP
13 Note: indexes start at 1 in Lua, so the program name is at arg[1]
14 instead of the more customary index zero.
15 .TP
16 \f[B]\-i|\-\-interactive\f[R]
17 Run an interactive session after executing optional script or statement.
18 .TP
19 \f[B]\[en]opts=OPTSTRING\f[R]
20 Perform \f[B]getopt\f[R](3) option processing on the passed arguments
21 according to OPTSTRING.
22 .TP
23 \f[B]\-e|\-\-execute\f[R]
24 Execute a Lua statement before executing optional script.
25 .SH EXAMPLES
26 Execute test.lua script file:
27 .RS
28 .PP
29 rpmlua test.lua
30 .RE
31 .PP
32 Execute args.lua script file with option processing:
33 .RS
34 .PP
35 rpmlua \[en]opts=ab:c args.lua \[en] 1 2 3 \-c \-b5
36 .RE
37 .PP
38 Execute single statement to compare rpm versions:
39 .RS
40 .PP
41 rpmlua \-e \[lq]print(rpm.ver(`1.0') < rpm.ver(`2.0'))\[rq]
42 .RE
43 .PP
44 Run an interactive session:
45 .RS
46 .PP
47 rpmlua \-i
48 .RE
49 .SH SEE ALSO
50 \f[B]lua\f[R](1), \f[B]popt\f[R](3), \f[B]getopt\f[R](3),
51 \f[B]rpm\f[R](8)
52 .PP
53 \f[B]http://www.rpm.org/ <URL:http://www.rpm.org/>\f[R]
54 .SH AUTHORS
55 .IP
56 .EX
57 Panu Matilainen <pmatilai\[at]redhat.com>
58 .EE