diff options
author | Paul Wise <pabs@debian.org> | 2015-02-04 00:04:37 +0000 |
---|---|---|
committer | Paul Wise <pabs@debian.org> | 2015-02-04 00:04:37 +0000 |
commit | 889ab9920b4565c13f675102b26032faf50808ab (patch) | |
tree | 5d10f82bf588380425d91c91300bb4bba24f6050 /bin/compare-embed-usertags | |
parent | 8154d84828df1f47861c696e4ef4fb3a11b32746 (diff) |
wip
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@31947 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/compare-embed-usertags')
-rwxr-xr-x | bin/compare-embed-usertags | 40 |
1 files changed, 40 insertions, 0 deletions
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 <pabs@debian.org> +# +# 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 <https://www.gnu.org/licenses/>. + +# 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 |