update revision 393fd55d91306e6def3a3d06748eee031f57bd17
1N/A#!/bin/sh
1N/Acommit=
1N/Aif type fetch >/dev/null 2>&1
1N/Athen
1N/A fetch=fetch
1N/Aelif type curl >/dev/null 2>&1
1N/Athen
1N/A fetch="curl -O"
1N/Aelse
1N/A exit 1
1N/Afi
1N/A
1N/Afor i
1N/Ado
1N/A z=`expr "$i" : 'http://www.ietf.org/internet-drafts/\(.*\)'`
1N/A if test -n "$z"
1N/A then
1N/A i="$z"
1N/A fi
1N/A if test -f "$i"
1N/A then
1N/A continue
1N/A fi
1N/A pat=`echo "$i" | sed 's/...txt/??.txt/'`
1N/A old=`echo $pat 2> /dev/null`
1N/A if test "X$old" != "X$pat"
1N/A then
1N/A newer=0
1N/A for j in $old
1N/A do
if test $j ">" $i
then
newer=1
fi
done
if test $newer = 1
then
continue;
fi
fi
if $fetch "http://www.ietf.org/internet-drafts/$i"
then
git add "$i"
if test "X$old" != "X$pat"
then
rm $old
git rm $old
commit="$commit $old"
fi
commit="$commit $i"
fi
done
if test -n "$commit"
then
git commit -m "new draft"
git push
fi