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>
8 # Copyright 2013 Gerald Combs
10 # SPDX-License-Identifier: GPL-2.0-or-later
13 bz_url_pfx="https://bugs.wireshark.org/bugzilla/show_bug.cgi"
17 hash recode > /dev/null 2>&1 && recode_cmd="recode html..utf8"
21 clipboard_cmd="pbcopy -Pascii"
24 clipboard_cmd="cat > /dev/clipboard"
27 clipboard_cmd="xsel --clipboard"
30 echo "Unable to copy to clipboard"
31 clipboard_cmd="cat > /dev/null"
35 if [ -z "$bug_id" ] ; then
36 echo "Usage: $( basename "$0" ) <bug id>"
41 curl -s -o - "${bz_url_pfx}?id=$bug_id" \
45 -e 's:.*<title>.*ndash; ::' \
48 -e 's/\\/{backslash}/' \
51 echo -e "* $bug_title wsbuglink:${bug_id}[].\\n" \
55 echo "Copied $bug_id: $bug_title"