diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2012-03-09 20:54:29 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2012-03-09 20:54:29 +0100 |
commit | 2d489206ff5462a0257147f6b200d2d713373662 (patch) | |
tree | 3664224f7ed85b941a9c0d44a844329a86149224 /watch-bz | |
parent | a94ad9f4c87f6dfb7a060201c6bd4c7023ffdfff (diff) | |
download | watch-bz-2d489206ff5462a0257147f6b200d2d713373662.tar.gz watch-bz-2d489206ff5462a0257147f6b200d2d713373662.tar.xz watch-bz-2d489206ff5462a0257147f6b200d2d713373662.zip |
output component only if more of them required
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'watch-bz')
-rwxr-xr-x | watch-bz | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -17,8 +17,6 @@ STATUS=OPEN REFRESH_INTERVAL=600 # [s], better not to drain bugzilla's power... SEP=@@@ -OUTPUT_FMT="%{component}$SEP%{bug_id}$SEP%{product}$SEP%{priority}$SEP%{status}$SEP%{flags}$SEP%{short_desc}" -#OUTPUT_FMT="%{component}$SEP%{bug_id}$SEP%{product}$SEP%{priority}$SEP%{status}$SEP%{short_desc}" WIDTH=$(( $(stty size | cut -d' ' -f2) - 1 )) @@ -32,6 +30,13 @@ if [ $# -ge 1 ]; then fi fi +echo $COMPONENT | grep -q ',' +if [ $? -eq 0 ]; then + OUTPUT_FMT="%{component}$SEP%{bug_id}$SEP%{product}$SEP%{priority}$SEP%{status}$SEP%{flags}$SEP%{short_desc}" +else + OUTPUT_FMT="%{bug_id}$SEP%{product}$SEP%{priority}$SEP%{status}$SEP%{flags}$SEP%{short_desc}" +fi + watch -t --interval $REFRESH_INTERVAL \ "$BUGZILLA query -c $COMPONENT -t $STATUS --outputformat $OUTPUT_FMT \ | sed -u \ |