PKG_CHECK(1) BSD Reference Manual PKG_CHECK(1)
pkg_check - shell interface to pkgtools matching routines
pkg_check version1 op version2 pkg_check [-q] -m pattern pkgname ...
The pkg_check command provides functions to check package versions in MirPorts. It is meant to be called from scripts, not directly from the command line. There are two distinct modes of operation. The first one, which takes three arguments, compares the two version strings version1 and version2. The second argument, the operator, is one of <, >, <=, >= or the text equivalents lt, gt, le and ge. The exit code is 0 if the comparison is true or 1 if it is false. The second mode allows to check whether one or more package names pkgname match the pattern given as the argument to the -m flag. Unless -q (quiet) is given, the matching package names are written to standard output, one per line. The exit status is 0 if there was at least one match, 1 other- wise.
pkg_check 1.4.5 ge 2.0 returns 1. pkg_check 23.42-0 '<' 23.42-5 returns 0. pkg_check -m 'autoconf->=2.50' autoconf-2.13 autoconf-2.62 prints "autoconf-2.62".
pkg_add(1), pkg_info(1), ports(7).
The pkg_check utility was introduced into The MirPorts Framework by Benny Siegert <firstname.lastname@example.org>. MirOS BSD #10-current March 9, 2010 1
Generated on 2013-04-27 00:20:00 by $MirOS: src/scripts/roff2htm,v 1.77 2013/01/01 20:49:09 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2013 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.