diff options
author | merakor <cem@ckyln.com> | 2021-07-27 09:24:26 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-07-27 09:24:26 +0000 |
commit | ab960e47945033bea128474a255ccf52ea1ddf6c (patch) | |
tree | 4ce7f857fcba417dbe709bf7a6ec1b61e8053f60 /src/cpt-list | |
parent | d8bb119df5965b154719958656032e38abc52ec3 (diff) | |
parent | 57093831d9c125b1ee872ecf21792324d2238354 (diff) | |
download | cpt-ab960e47945033bea128474a255ccf52ea1ddf6c.tar.gz |
blake3: merge trunk
FossilOrigin-Name: 8bba905c9082ee971fbe79d4be7eaa96072362689725add1f5341c0ec1d282fa
Diffstat (limited to 'src/cpt-list')
-rwxr-xr-x | src/cpt-list | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cpt-list b/src/cpt-list index 4eb7cf6..fcb1f49 100755 --- a/src/cpt-list +++ b/src/cpt-list @@ -3,10 +3,11 @@ parser_definition() { setup REST help:usage -- \ - "usage: ${0##*/} [-c] pkg..." \ + "usage: ${0##*/} [-cq] pkg..." \ "or: ${0##*/} -C pkg true-statement false-statement" msg -- '' 'Options:' flag CURRENT -c --current -- "Use the current directory as a package" + flag quiet -q --quiet -- "Make the operation quiet" param PKG -C --check label:" -C,--check PKG TRUE FALSE" -- \ "Check if PKG exists and return the string of TRUE if"\ "it exists, and the string of FALSE if it doesn't." \ @@ -23,7 +24,7 @@ if [ "$PKG" ]; then printf %s "$2" fi else -[ "$CURRENT" ] && set -- "${PWD##*/}" - -pkg_list "$@" + [ "$CURRENT" ] && set -- "${PWD##*/}" + [ "$quiet" ] && exec >/dev/null 2>&1 + pkg_list "$@" fi |