aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2011-02-20 13:45:46 +0100
committerChristian Ruppert <idl0r@gentoo.org>2011-02-20 13:45:46 +0100
commitb8e4f7adcf02a417bd5b993d419b3fc7cc119ab3 (patch)
tree3a5e2748259536aca5511fe2b6a36cac545564ba /runstats.sh
parentAdd Gentoo extension (diff)
downloadbugzilla-b8e4f7adcf02a417bd5b993d419b3fc7cc119ab3.tar.gz
bugzilla-b8e4f7adcf02a417bd5b993d419b3fc7cc119ab3.tar.bz2
bugzilla-b8e4f7adcf02a417bd5b993d419b3fc7cc119ab3.zip
Add runstats.sh
Diffstat (limited to 'runstats.sh')
-rwxr-xr-xrunstats.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/runstats.sh b/runstats.sh
new file mode 100755
index 000000000..09caaf449
--- /dev/null
+++ b/runstats.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+cd /var/www/bugs.gentoo.org/htdocs
+outpath="/var/www/bugs.gentoo.org/htdocs/data/cached"
+./collectstats.pl
+dofile() {
+ url="$1"
+ outfile="$2"
+ tmp="${outfile}.$$"
+ #echo $url
+ wget -q "$url" -O "${tmp}" --header 'Host: bugs.gentoo.org'
+ if [ $? -eq 0 ]; then
+ gzip -9 <"${tmp}" >"${tmp}.gz"
+ mv -f "${tmp}" "${outfile}"
+ mv -f "${tmp}.gz" "${outfile}gz"
+ else
+ rm -f "${tmp}" "${tmp}.gz" "${outfile}" "${outfile}gz"
+ fi
+}
+for status in RESOLVED VERIFIED CLOSED ; do
+ for reso in FIXED INVALID WONTFIX LATER REMIND WORKSFORME CANTFIX NEEDINFO TEST-REQUEST UPSTREAM ; do
+ dofile "http://localhost/custom_buglist.cgi?reso=${reso}&status=${status}" ${outpath}/buglist-${status}-${reso}.html
+ done
+done
+for status in UNCONFIRMED NEW ASSIGNED REOPENED ; do
+ dofile "http://localhost/custom_buglist.cgi?status=${status}" ${outpath}/buglist-${status}.html
+done