wpkg --atleast-version

Options Comments
--admindir Define the administration directory, where the database of the installed packages resides.
--debug Define a set of flags of things to print out for debug purposes.
--instdir Define the installation directory, where the data files are installed on the target.
--quiet Not used.
--root Define the installation root path.
--verbose Not used.

The --atleast-version command is used to determine whether a package has a given version or more. The parameters to the command are the version and the package name. The function accepts only one package name because it is likely an error to check more than one package at a time against the same version.

There is an example on how this is used in a Unix shell script:

if wpkg --atleast-version 2.9.3 this-package; then
  # the package is at least 2.9.3 so we can do this:
  # the package is too old, use a fallback

This command is very similar to the --atleast-wpkg-version command, only it checks any package, not just wpkg. You may also want to check out --exact-version and --max-version.

Syndicate content