make more robust, handle more uri formats used by IETF

This commit is contained in:
Mark Andrews
2012-07-14 12:18:56 +10:00
parent 6809e4defb
commit a846a36bde

View File

@@ -14,15 +14,18 @@ for i
do
z=
case $i in
http://www.ietf.org/internet-drafts/*)
z=`expr "$i" : 'http://www.ietf.org/internet-drafts/\(.*\)'`
;;
http://www.ietf.org/id/*)
z=`expr "$i" : 'http://www.ietf.org/id/\(.*\)'`
http://tools.ietf.org/html/*|http://www.ietf.org/internet-drafts/*|http://www.ietf.org/id/*)
z=`expr "$i" : 'http://.*/.*/\(.*\)'`
;;
*://*/*)
echo -n "unknown uri $i"
continue;
esac
if test -n "$z"
then
case $z in
*-[0-9][0-9]) z="$z.txt"''
esac
i="$z"
fi
if test -f "$i"