From 0f6869aef88b5a0149978bc4ee7c2dd2a6823daf Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Sun, 30 Sep 2018 15:28:08 +0000 Subject: [PATCH] add verbose option to contents --- zpm-contents | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/zpm-contents b/zpm-contents index 3d1d13f..79fc293 100755 --- a/zpm-contents +++ b/zpm-contents @@ -2,9 +2,12 @@ pkgfile=${ZPMDB:-/var/lib/zpm/db.zpm} -while getopts f: opt; do +verbose=0 + +while getopts f:v opt; do case $opt in f) pkgfile="$OPTARG" ;; + v) verbose=1 esac done shift $((OPTIND - 1)) @@ -16,16 +19,25 @@ if [ ! -f $pkgfile ]; then exit 1 fi +cols= +if [ $verbose -gt 0 ]; then + cols='filetype,mode,username,groupname,' +fi for pkg in "$@"; do pkgid=$(zpm findpkg -f $pkgfile $pkg) zpm shell $pkgfile <