Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / bin / ftp-rfc
CommitLineData
920dae64
AT
1#!/bin/sh
2# \
3exec expect -- "$0" ${1+"$@"}
4
5# ftp-rfc <rfc-number>
6# ftp-rfc -index
7
8# retrieves an rfc (or the index) from uunet
9
10exp_version -exit 5.0
11
12if {$argc!=1} {
13 send_user "usage: ftp-rfc \[#] \[-index]\n"
14 exit
15}
16
17set file "rfc$argv.Z"
18
19set timeout 60
20spawn ftp ftp.uu.net
21expect "Name*:"
22send "anonymous\r"
23expect "Password:"
24send "expect@nist.gov\r"
25expect "ftp>"
26send "binary\r"
27expect "ftp>"
28send "cd inet/rfc\r"
29expect "550*ftp>" exit "250*ftp>"
30send "get $file\r"
31expect "550*ftp>" exit "200*226*ftp>"
32close
33wait
34send_user "\nuncompressing file - wait...\n"
35exec uncompress $file
36