[Reproducible-commits] [misc] 01/01: reports: add -o option to bin/review-bugs to skip populating the cache

Ximin Luo infinity0 at debian.org
Mon May 16 22:38:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository misc.

commit 780bb1b9bf7246f071301efcfabb7b1be159405b
Author: Ximin Luo <infinity0 at debian.org>
Date:   Tue May 17 00:38:24 2016 +0200

    reports: add -o option to bin/review-bugs to skip populating the cache
---
 reports/bin/review-bugs | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/reports/bin/review-bugs b/reports/bin/review-bugs
index 522f1c6..037f026 100755
--- a/reports/bin/review-bugs
+++ b/reports/bin/review-bugs
@@ -4,14 +4,26 @@
 # Copyright © 2015 Lunar <lunar at debian.org>
 # Licensed under WTFPL — http://www.wtfpl.net/txt/copying/
 
+offline=false
+while getopts 'o' opt; do
+	case $opt in
+		o)
+			offline=true
+			;;
+	esac
+done
+shift `expr $OPTIND - 1`
+
 bugs=${1:-bugs}
 
 TOTAL="$(wc -l "$bugs" | awk '{ print $1 }')"
 
-for bug in $(cat "$bugs"); do
-	bts cache --cache-mode=mbox "$bug" >/dev/null
-	echo "$bug"
-done | pv -t -e -p -l -s "$TOTAL"
+if ! $offline; then
+	for bug in $(cat "$bugs"); do
+		bts cache --cache-mode=mbox "$bug" >/dev/null
+		echo "$bug"
+	done | pv -t -e -p -l -s "$TOTAL"
+fi
 for bug in $(cat "$bugs"); do
 	bts -o show --mbox "$bug"
 done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list