1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
.Dd Apr 17, 2023
.Dt cpt-list 1
.Sh NAME
.Nm cpt-list
.Nd list packages
.Sh SYNOPSIS
.Nm
.Op Fl cq
.Ar pkg...
.Nm
.Fl C
.Ar pkg
.Op Ar true-statement
.Op Ar false-statement
.Nm
.Fl V
.Ar pkg version
.Op Ar release
.Sh DESCRIPTION
.Nm
can be used to list all packages or check if the given package is
installed on the system. Without any arguments supplied,
.Nm
will list all packages installed on the system. Otherwise, it will check and
list the given packages. If any of the given packages are not installed on the
system,
.Nm
will exit with an error. However,
.Fl C , -check
and
.Fl V , -version-check
flags can be used in order to change the behaviour of the utility:
.Bl -tag -width 12n
.It Fl c , -current
Assumes that the current directory is a package and will use it instead of
arguments.
.It Fl q , -quiet
Make the operation quiet, only reporting exit status.
.It Fl C , -check Ar package true_statement false_statement
Checks whether the
.Em package
is installed on the system and returns the string for
.Em true_statement
if it is installed and the string for
.Em false_statement
if it isn't. This function is mostly useful for being called inside packages for
optional dependencies.
.It Fl V , -version-check Ar package version release
Checks if given
.Em package
exists in the given
.Em version
and
.Em release
numbers.
.Nm
exits 0 on success, and 1 if the given package does not match the version or
release number given to the utility.
.El
.Sh AUTHOR
.An Cem Keylan Aq Mt cem@ckyln.com
.Sh LICENSE
See LICENSE for copyright information.
.Sh SEE ALSO
.Xr cpt 1
|