diff options
author | Brian Ginsbach <brian.ginsbach@gmail.com> | 2020-03-30 22:12:36 +0300 |
---|---|---|
committer | Brian Ginsbach <brian.ginsbach@gmail.com> | 2020-03-30 22:12:36 +0300 |
commit | eb7dbab1ee55f24a300b58ef845edc18d443f68a (patch) | |
tree | 62b8366ccc60e3b384038729f5ee083a151f2e86 /include/functions | |
parent | 2b1d5fa46ffe7c9794fe8fc972040d722a35b17c (diff) |
Add pkg_info to PackageIsInstalled
The `pkg_info` command is used on a system using NetBSD pkgsrc to
determine which packages are installed.
Diffstat (limited to 'include/functions')
-rw-r--r-- | include/functions | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/functions b/include/functions index ed1a58eb..5b60419f 100644 --- a/include/functions +++ b/include/functions @@ -2041,6 +2041,9 @@ elif [ -n "${PKG_BINARY}" ]; then output=$(${PKG_BINARY} -N info ${package} >/dev/null 2>&1) exit_code=$? # 0=package installed, 70=invalid package + elif [ -n "${PKGINFOBINARY}" ]; then + output=$(${PKGINFOBINARY} -q -e ${package} >/dev/null 2>&1) + exit_code=$? # 0=package installed, 1=package not installed elif [ -n "${RPMBINARY}" ]; then output=$(${RPMBINARY} --quiet -q ${package} > /dev/null 2>&1) exit_code=$? |