5 if [ "$1" = "-q" ];then
10 if [ "$1" = "-n" ];then
15 # http://sourceware.org/ml/gdb-cvs/2099-99/msg99999.html
16 if [ "$arg" != "${arg#http://sources.redhat.com/}" ];then
17 arg="http://sourceware.org/${arg#http://sources.redhat.com/}"
19 if [ "$arg" != "${arg#http://sourceware.org/ml/}" -a "$arg" != "${arg%.html}" ];then
22 raw="$(wget -q -O - "$arg" | sed -n 's#^.*<a href="\(/cgi-bin/get-raw-msg[?][^"]*\)">Raw text</a>.*$#\1#p')"
26 changelogget -q $changelog $(wget -q -O - "$arg" | sed -n -e 's/&/\&/g' -e 's#^<a \+href="\(.*\)">\1</a>$#\1#p')
29 wget -q -O - "http://sourceware.org$raw" | sed -n -e '/^Subject:/p' -e '/^$/,$p'
31 elif [ "$arg" != "${arg#http://sourceware.org/cgi-bin/cvsweb.cgi/src/}" ];then
33 # --- src/gdb/ChangeLog 2008/04/24 08:46:17 1.9308
34 wget -q -O - "$arg" | diffdecvs | if [ -z "$changelog" ];then perl -p -e '$c=1 if s{^(?:---|\Q+++\E)(?= \S+/ChangeLog\t)}{###};s{^@@}{##} if $c;'; else cat; fi
36 echo >&2 "Invalid URL: $arg"