X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-log;h=1a0f9392eb458a1ea0d4f61caa0965c8d2e5ebd8;hb=2f39a3c3c83bd4b74a935294da76fdcca926280b;hp=8e53f6204060edffb64d0889cb2e62d61f35c993;hpb=0c6d2b1131db0c4b477d52b935ff6a7f52084a3c;p=zpackage diff --git a/zpm-log b/zpm-log index 8e53f62..1a0f939 100755 --- a/zpm-log +++ b/zpm-log @@ -8,10 +8,11 @@ op=search action= json=0 +verbose=0 pkgfile=${ZPMDB:-/var/lib/zpm/local.db} -while getopts f:t:a:T:ij opt; do +while getopts f:t:a:T:ijv opt; do case $opt in f) pkgfile="$OPTARG" ;; t) target="$OPTARG" ;; @@ -19,6 +20,7 @@ while getopts f:t:a:T:ij opt; do T) timestamp="$OPTARG" ;; i) op=insert ;; j) json=1 ;; + v) verbose=1 ;; *) printf '%s unknown option %s\n' "$0" "$opt" ; exit 1 ;; esac done @@ -50,6 +52,10 @@ if [ $op = 'insert' ]; then printf ';\n' } | zpm shell $pkgfile +if [ $verbose -ne 0 ]; then + printf "%s %s %s\n" "$action" "$target" "$*" 1>&2 +fi + fi cols='ts,target,action,info'