diff options
author | merakor <cem@ckyln.com> | 2021-07-17 21:50:07 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-07-17 21:50:07 +0000 |
commit | 712eea99e9ee1f542ec27147e175b2520a71250d (patch) | |
tree | f1b8f3bbcc8c7dbb35bc32ddd4d592659c810bdd /src/cpt-list | |
parent | 7d4770a67bd91e9cb67d429880fe79dc48dd8337 (diff) | |
download | cpt-712eea99e9ee1f542ec27147e175b2520a71250d.tar.gz |
cpt-list: add flag to make the operation quiet
FossilOrigin-Name: f3ae20b2f810fa30dcea616faf392240300529f76779bb2dde07a417bda722bc
Diffstat (limited to 'src/cpt-list')
-rwxr-xr-x | src/cpt-list | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cpt-list b/src/cpt-list index 4eb7cf6..77a9071 100755 --- a/src/cpt-list +++ b/src/cpt-list @@ -7,6 +7,7 @@ parser_definition() { "or: ${0##*/} -C pkg true-statement false-statement" msg -- '' 'Options:' flag CURRENT -c --current -- "Use the current directory as a package" + flag quiet -q -- "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 |