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))
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