blob: 76f95097ad1dc1fbb48b22a74bcec97508e832da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#!/bin/rc -b
# grabrfc - copy new rfcs into /lib/rfc
# grabrfc -d - copy draft rfcs as well
rfork en
path=(/bin)
fn cd
flagfmt='d:drafts'
eval `''{aux/getflags $*} || exec aux/usage
dom=`{ndb/query sys $sysname dom}
if(~ $dom '') dom=$sysname
ftpfs -q/ -a $user@$dom ftp.rfc-editor.org
found=no
LIB=/lib/rfc
cd /n/ftp/in-notes
fn cprfc {
f=$1
shift
}
for(i in rfc*.txt){
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
if (~ $drafts '')
exit
ftpfs -q/ -a $user@$dom ftp.math.utah.edu
# copy in new ones
found=no
LIB=/lib/rfc/drafts
mkdir -p $LIB
cd /n/ftp/pub/mirrors/ftp.ietf.org/internet-drafts
for(i in draft-*.txt){
target=`{
echo $i | sed '
s/.txt$//
s/draft-//'
}
if (test ! -e $LIB/$target && test -f $i &&
test `{ls -s $i | sed 's/ .*//'} -ge 2){
cp $i $LIB/$target
chmod 664 $LIB/$target
found=yes
echo drafts/$target
}
}
if (~ $found yes) {
if (test -f 1id-index.txt)
<1id-index.txt sed '
s/\.txt//
s/draft-//' > $LIB/index
if not
>[1=2] echo no draft index found
if (test -f 1id-abstracts.txt)
<1id-abstracts.txt sed '
s/\.txt//
s/draft-//' > $LIB/abstracts
if not
>[1=2] echo no abstracts found
}
unmount /n/ftp
|