From: Nathan Wagner Date: Thu, 6 Dec 2018 13:56:32 +0000 (+0000) Subject: add options only list shared libraries X-Git-Tag: v0.3.7~3 X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=e21785a5c6b2f84521d1a63ba504ebeece4bc75d add options only list shared libraries --- diff --git a/zpm-contents b/zpm-contents index 447e095..acd0636 100755 --- a/zpm-contents +++ b/zpm-contents @@ -8,8 +8,9 @@ quiet=0 config=include showsoname=0 status= +sharedlibsonly=0 -while getopts f:qlncCLI opt; do +while getopts f:qlncCLIs opt; do case $opt in f) pkgfile="$OPTARG" ;; l) long=1 ;; @@ -18,7 +19,8 @@ while getopts f:qlncCLI opt; do c) config=only ;; C) config=exclude ;; L) showsoname=1 ;; - I) status=installed + s) sharedlibsonly=1 ;; + I) status=installed ;; esac done shift $((OPTIND - 1)) @@ -89,7 +91,7 @@ cols=${cols%,} printf "else path end as path\n" fi printf "from packagefiles_pkgid PF\n" - if [ $showsoname -eq 1 ]; then + if [ $showsoname -eq 1 ] || [ $sharedlibsonly -eq 1 ]; then printf "left join elflibraries EL on EL.file = PF.hash\n" fi if [ -n "$status" ]; then @@ -106,6 +108,9 @@ cols=${cols%,} only) printf "and configuration = 1\n" ;; exclude) printf "and configuration = 0\n" ;; esac + if [ $sharedlibsonly -eq 1 ]; then + printf "and EL.soname is not null\n" + fi if [ -n "$status" ]; then printf "and P.status = '%s'\n" "$status" fi