diff options
author | Taru Karttunen <taruti@taruti.net> | 2011-03-30 19:35:09 +0300 |
---|---|---|
committer | Taru Karttunen <taruti@taruti.net> | 2011-03-30 19:35:09 +0300 |
commit | a9060cc06bee66e12fe16644511f181a4b0cdbd3 (patch) | |
tree | 8778fe5d1ab1e6eefee29b357ee5b585f5b7ad30 /lib/rfc | |
parent | 1206371abb0d786be1d5ee4201ff864680e2387b (diff) | |
download | plan9front-a9060cc06bee66e12fe16644511f181a4b0cdbd3.tar.xz |
Import sources from 2011-03-30 iso image - lib
Diffstat (limited to 'lib/rfc')
-rwxr-xr-x | lib/rfc/grabrfc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/rfc/grabrfc b/lib/rfc/grabrfc new file mode 100755 index 000000000..32611c323 --- /dev/null +++ b/lib/rfc/grabrfc @@ -0,0 +1,46 @@ +#!/bin/rc +# grabrfc - copy new rfcs and drafts into /lib/rfc +rfork en +path=(/bin) +fn cd +dom=`{ndb/query sys $sysname dom} + +ramfs +ftpfs -q/ -a $user@$dom ftp.rfc-editor.org # was ftp.isi.edu + +found=no +LIB=/lib/rfc +cd /n/ftp/in-notes +for(i in rfc*){ + target=`{ + echo $i | sed ' + s/.txt$// + s/rfc0*/rfc/' + } + if(test ! -e $LIB/$target && test -f $i){ + cp $i $LIB/$target + chmod 664 $LIB/$target + found=yes + echo $target + } +} +if (~ $found yes) + tr A-Z a-z <rfc-index.txt | sed 's/^0*//' | + sed 's/^[0-9]/rfc&/' >$LIB/index +unmount /n/ftp + +ftpfs -q/ -a $user@$dom ftp.ietf.org + +# copy in new ones +found=no +LIB=/lib/rfc/drafts +cd /n/ftp/internet-drafts +for(i in *){ + target=$i + if (test ! -e $LIB/$target && test -f $i && + test `{ls -s $i | sed 's/ .*//'} -ge 2){ + cp $i $LIB/$target + chmod 664 $LIB/$target + echo drafts/$i + } +} |