2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-26 20:17:35 +00:00
bind/doc/draft/update

69 lines
974 B
Plaintext
Raw Normal View History

2002-07-04 00:32:48 +00:00
#!/bin/sh
2004-06-08 07:12:10 +00:00
commit=
if type fetch >/dev/null 2>&1
then
fetch=fetch
elif type curl >/dev/null 2>&1
then
2012-04-27 10:34:27 +10:00
fetch="curl -L -O"
else
exit 1
fi
2002-07-04 00:32:48 +00:00
for i
do
2012-04-27 10:45:05 +10:00
z=
case $i in
http://tools.ietf.org/html/*|http://www.ietf.org/internet-drafts/*|http://www.ietf.org/id/*)
z=`expr "$i" : 'http://.*/.*/\(.*\)'`
2012-04-27 10:45:05 +10:00
;;
*://*/*)
echo -n "unknown uri $i"
continue;
2012-04-27 10:45:05 +10:00
esac
2004-03-09 02:44:22 +00:00
if test -n "$z"
then
case $z in
*-[0-9][0-9]) z="$z.txt"''
esac
2004-03-09 02:44:22 +00:00
i="$z"
fi
2002-07-04 00:32:48 +00:00
if test -f "$i"
then
continue
fi
pat=`echo "$i" | sed 's/...txt/??.txt/'`
old=`echo $pat 2> /dev/null`
if test "X$old" != "X$pat"
then
newer=0
for j in $old
do
2002-10-25 22:12:09 +00:00
if test $j ">" $i
then
newer=1
fi
done
if test $newer = 1
then
continue;
fi
fi
2012-04-27 10:45:05 +10:00
if $fetch "http://www.ietf.org/id/$i"
2002-07-04 00:32:48 +00:00
then
git add "$i"
if test "X$old" != "X$pat"
then
rm $old
git rm $old
2004-06-08 07:12:10 +00:00
commit="$commit $old"
fi
2004-06-08 07:12:10 +00:00
commit="$commit $i"
2002-07-04 00:32:48 +00:00
fi
done
2004-06-08 07:12:10 +00:00
if test -n "$commit"
then
git commit -m "new draft"
git push
2004-06-08 07:12:10 +00:00
fi