Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
changeset 103:05058a166e6e
Docu: assert_local_version() documented
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 26 Sep 2019 09:49:21 +0200 |
| parents | 91fb0af73fce |
| children | 6f6058939e48 |
| files | bin/check-ports |
| diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/check-ports Thu Sep 26 09:37:25 2019 +0200 +++ b/bin/check-ports Thu Sep 26 09:49:21 2019 +0200 @@ -241,6 +241,23 @@ } assert_local_version() { + : 'Check whether an installed package `_name` has given + version `_version`. + + Args: + _name: the package name + _version: the version to check for + + Input (Globals): + installed_data: the output of ``pkg query "%n %v %R"`` of all + installed packages + + Returns: + - 0 if the installed version of package `_name` is equal to `_version` + - 1 if the installed version of package `_name` differs from `_version` + - 2 on other errors + + ' local _name _version _n _v _r _name=$1
