3 # Given a Wireshark bug ID, fetch its title and prepare an entry suitable
4 # for pasting into the release notes. Requires curl, grep, and sed.
6 # Usage: gen-bugnote <bug number>
10 # Copyright 2013 Gerald Combs
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License
14 # as published by the Free Software Foundation; either version 2
15 # of the License, or (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 if [ -f release-notes.asciidoc
-o -f docbook
/release-notes.asciidoc
] ; then
32 while getopts "o:" OPT
; do
38 shift $
(($OPTIND - 1))
40 bz_url_pfx
="https://bugs.wireshark.org/bugzilla/show_bug.cgi?id="
44 hash recode > /dev
/null
2>&1 && recode_cmd
="recode html..utf8"
48 clipboard_cmd
="pbcopy -Pascii"
51 clipboard_cmd
="cat > /dev/clipboard"
54 clipboard_cmd
="xsel --clipboard"
57 echo "Unable to copy to clipboard"
58 clipboard_cmd
="cat > /dev/null"
62 if [ -z "$bug_id" ] ; then
63 echo "Usage: " `basename $0` " <bug id>"
68 curl -s -o - "https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=$bug_id" |
71 -e 's:.*<title>.*ndash; ::' \
78 echo -e "* $bug_title (ws-buglink:$bug_id[])\n" \
86 (<ulink url="https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=$bug_id">Bug
94 echo "Copied $bug_id: $bug_title"