From 99e037bd1d542fb8be369aa506cd749e509a0b36 Mon Sep 17 00:00:00 2001 From: Christian Loos Date: Mon, 7 Apr 2014 08:28:41 +0200 Subject: [PATCH] move wget options in a variable --- plugins/requesttracker/rt_ticket_loadtime | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/requesttracker/rt_ticket_loadtime b/plugins/requesttracker/rt_ticket_loadtime index 530fd372..576f5ad5 100755 --- a/plugins/requesttracker/rt_ticket_loadtime +++ b/plugins/requesttracker/rt_ticket_loadtime @@ -74,6 +74,8 @@ ticket_id=${ticket_id:-"1"} time=$(which time) wget=$(which wget) +wget_opts="--page-requisites --no-cache --no-check-certificate --delete-after --quiet" + if [ "$1" = "autoconf" ]; then if [ "x$time" = "x" -o "x$wget" = "x" ]; then echo "no (need time and wget programs)" @@ -107,8 +109,8 @@ url_webui="${web_url}Ticket/Display.html?id=${ticket_id}&user=${username}&pass=$ url_rest="${web_url}REST/1.0/ticket/${ticket_id}/history?format=l&user=${username}&pass=${password}" cd $tmpdir || exit1 -loadtime_webui=$($time --portability $wget --page-requisites --no-cache --no-check-certificate --delete-after --quiet $url_webui 2>&1 | awk '/^real / {print $2}') -loadtime_rest=$($time --portability $wget --page-requisites --no-cache --no-check-certificate --delete-after --quiet $url_rest 2>&1 | awk '/^real / {print $2}') +loadtime_webui=$($time --portability $wget $wget_opts $url_webui 2>&1 | awk '/^real / {print $2}') +loadtime_rest=$($time --portability $wget $wget_opts $url_rest 2>&1 | awk '/^real / {print $2}') cd .. echo "webui.value $loadtime_webui"