X-Git-Url: https://pd.if.org/git/?p=zpackage;a=blobdiff_plain;f=zpm-contents;h=6bc470e51e9c59fa0c74cae9657ac20de8c48fd6;hp=8b7dde005b9f2314da725bfab9f8a5686e6273d0;hb=0c6d2b1131db0c4b477d52b935ff6a7f52084a3c;hpb=4238c6794cfe19c0d8fd62da35eb966f1868f9da diff --git a/zpm-contents b/zpm-contents index 8b7dde0..6bc470e 100755 --- a/zpm-contents +++ b/zpm-contents @@ -5,13 +5,16 @@ pkgfile=${ZPMDB:-/var/lib/zpm/db.zpm} long=0 pkgonly=0 quiet=0 +config=include -while getopts f:qln opt; do +while getopts f:qlncC opt; do case $opt in f) pkgfile="$OPTARG" ;; l) long=1 ;; n) pkgonly=1 ;; q) quiet=1 ;; + c) config=only ;; + C) config=exclude ;; esac done shift $((OPTIND - 1)) @@ -79,6 +82,10 @@ cols=${cols%,} if [ -n "$pkglist" ]; then printf "and pkgid in (%s)\n" "$pkglist" fi + case $config in + only) printf "and configuration = 1\n" ;; + exclude) printf "and configuration = 0\n" ;; + esac printf 'order by pkgid,path\n' printf ';\n' } | zpm shell $pkgfile