pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Checking whether a package is installed
* On 2015-08-03 at 15:47 BST, Andreas Gustafsson wrote:
> Suppose my current directory is the pkgsrc directory of some package
> (pkgsrc/category/package). Is there a shell command I can run that
> will return an exit status indicating whether or not the package in
> case is already installed (regardless of version), without building
> or reinstalling it?
Sure:
$ pkg_info -qE $(bmake show-var VARNAME=PKGBASE)
Exit status of 0 if installed, regardless of version, 1 otherwise, or
change to PKGNAME if you want to match version too.
--
Jonathan Perkin - Joyent, Inc. - www.joyent.com
Home |
Main Index |
Thread Index |
Old Index