From 4f20932cf395fb632690ee5e5f740da5619ddd11 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Wed, 4 Feb 2015 00:04:37 +0000 Subject: wip git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@31947 e39458fd-73e7-0310-bf30-c45bca0a0e42 --- bin/compare-embed-usertags | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 bin/compare-embed-usertags (limited to 'bin/compare-embed-usertags') diff --git a/bin/compare-embed-usertags b/bin/compare-embed-usertags new file mode 100755 index 0000000000..2e9234f67e --- /dev/null +++ b/bin/compare-embed-usertags @@ -0,0 +1,40 @@ +#!/bin/sh +# Copyright 2015 Paul Wise +# +# This file is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . + +# compare-embed-usertags +# Compares usertags matching *embed* with the embedded-code-copies data +# and reports any bugs that are missing from the embedded-code-copies data + +if [ ! -f data/embedded-code-copies ] ; then + echo "Please run from the top-level directory of the repository" >&2 + exit 1 +fi + +header=1 +rsync --recursive rsync://bugs.debian.org/bts-spool-index/user/ data/usertags/ +grep --recursive --ignore-case --files-with-matches '^Tag:.*embed' data/usertags/ | +while read user ; do + sed --silent '/^Tag:.*embed/,/^$/p' "$user" | + grep --only-matching '[0-9]\+' +done | +sort --unique | +while read bug ; do + if ! grep --silent --fixed-strings "$bug" data/embedded-code-copies ; then + test "$header" -eq 1 && printf 'Please add these bugs to data/embedded-code-copies\n\n' + printf 'https://bugs.debian.org/%s\n' "$bug" + header=0 + fi +done -- cgit v1.2.3