zsh completion for makepkg
[pacman-ng.git] / doc / vercmp.8.txt
blob6b94f3e48a384985d384c947e0f73f16b5fb48b5
1 /////
2 vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
3 /////
4 vercmp(8)
5 =========
7 Name
8 ----
9 vercmp - version comparison utility
12 Synopsis
13 --------
14 'vercmp' <version1> <version2>
17 Description
18 -----------
19 'vercmp' is used to determine the relationship between two given version
20 numbers. It outputs values as follows:
22 *  < 0 : if ver1 < ver2
23 *  = 0 : if ver1 == ver2
24 *  > 0 : if ver1 > ver2
26 Version comparison operates as follows:
28   Alphanumeric:
29     1.0a < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0 < 1.0.a < 1.0.1
30   Numeric:
31     1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
33 Additionally, version strings can have an 'epoch' value defined that will
34 overrule any version comparison (unless the epoch values are equal). This is
35 specified in an `epoch:version-rel` format. For example, `2:1.0-1` is always
36 greater than `1:3.6-1`.
38 Keep in mind that the 'pkgrel' is only compared if it is available on both
39 versions given to this tool. For example, comparing `1.5-1` and `1.5` will
40 yield 0; comparing `1.5-1` and `1.5-2` will yield < 0 as expected. This is
41 mainly for supporting versioned dependencies that do not include the 'pkgrel'.
44 Options
45 -------
46 *-h, \--help*::
47         Display syntax for the given operation. If no operation was supplied
48         then the general syntax is shown.
50 Examples
51 --------
53   $ vercmp 1 2
54   -1
56   $ vercmp 2 1
57   1
59   $ vercmp 2.0-1 1.7-6
60   1
62   $ vercmp 2.0 2.0-13
63   0
65   $ vercmp 4.34 1:001
66   -1
68 Configuration
69 -------------
70 There is none.
72 See Also
73 --------
74 linkman:pacman[8], linkman:makepkg[8], linkman:libalpm[3]
76 include::footer.txt[]