X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-list;h=2de524b0e89c0e64c9162970deb1103b020e4b39;hb=62e2d81f8e5c1a2284660752524753638ae59766;hp=471a2809a2e370f2372f7661cb326d1c089232a0;hpb=183c681069951ee7c2382aacc927916cf912a4e5;p=zpackage diff --git a/zpm-list b/zpm-list index 471a280..2de524b 100755 --- a/zpm-list +++ b/zpm-list @@ -15,17 +15,13 @@ while getopts :s:f:vn opt; do done shift $(( OPTIND - 1)) -: ${pkgfile:=$ZPMDB} +: ${pkgfile:=${ZPMDB:-/var/lib/zpm/local.db}} if [ -z "$pkgfile" ]; then echo "must specify package file" exit 1 fi -if [ -n "$status" ]; then - status=$(zpm quote "$status") -fi - if [ $nameonly -eq 0 ]; then cols="pkgid" else @@ -37,6 +33,7 @@ if [ $verbose -eq 1 ]; then fi if [ -n "$status" ]; then + status=$(zpm quote "$status") where="where status = '$status'" fi @@ -44,8 +41,8 @@ pkgid=$1 if [ -n "$pkgid" ]; then eval $(zpm parse -E "$pkgid") - if [ -n "$package" ]; then - package=$(zpm quote "$package") + if [ -n "$name" ]; then + package=$(zpm quote "$name") where="$where and package = '$package'" fi if [ -n "$version" ]; then @@ -63,4 +60,3 @@ zpm shell $pkgfile <