summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-08-15 19:10:27 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-08-15 19:10:27 +0200
commitf0ecb578d2cebf1521ccc8f28006a0ae8fdd1359 (patch)
tree47235b49fd863b0377e5964ba9f3488dc42341a7
parente28ab8bd9bd35fbd98f75116bf8f26d44b33b160 (diff)
downloadwatch-bz-f0ecb578d2cebf1521ccc8f28006a0ae8fdd1359.tar.gz
watch-bz-f0ecb578d2cebf1521ccc8f28006a0ae8fdd1359.tar.xz
watch-bz-f0ecb578d2cebf1521ccc8f28006a0ae8fdd1359.zip
Extended debugging of watch-bz
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rwxr-xr-xwatch-bz5
1 files changed, 5 insertions, 0 deletions
diff --git a/watch-bz b/watch-bz
index 9a63501..f7190e0 100755
--- a/watch-bz
+++ b/watch-bz
@@ -87,6 +87,7 @@ while [ $# -ge 1 ]; do
CMDLINE_HELP
[[ ${CMDLINE_HELP} =~ ^[Yy].*|^$ ]] && less "${BASH_SOURCE}"; exit;;
-m|--mine) MINE=1;;
+ -d|--debug) WATCHBZ_DEBUG=1;;
--) shift; break;;
-*) CMDLINE_STATUS+=",$(echo "$1" | cut -c2-)";;
*) CMDLINE_COMPONENT+=",$1";;
@@ -184,6 +185,10 @@ do_watch () {
[ "${WATCHBZ_DEBUG}" -ne 0 ] && EXEC="sh -c"
TAIL="${HERE}/table-data $SEP | sort | ${PRECOLORIZE} | cut -c-$WIDTH | ${COLORIZE}"
[ "${WATCHBZ_DEBUG}" -ne 0 ] && TAIL="cat"
+ [ "${WATCHBZ_DEBUG}" -ne 0 ] && BUGZILLA+=" --debug"
+ [ "${WATCHBZ_DEBUG}" -ne 0 ] && echo \
+ "${BUGZILLA} --cookiefile=${BUGZILLA_COOKIE} query -c ${COMPONENT} \
+ -t \"${STATUS}\" --outputformat ${OUTPUT_FMT} ${QUERY_REST}"
${EXEC} \
"${BUGZILLA} --cookiefile=${BUGZILLA_COOKIE} query -c ${COMPONENT} \
-t \"${STATUS}\" --outputformat ${OUTPUT_FMT} ${QUERY_REST} \