home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2253 < prev    next >
Encoding:
Internet Message Format  |  1990-12-28  |  2.2 KB

  1. From: dfs@doe.carleton.ca (David F. Skoll)
  2. Newsgroups: alt.sources
  3. Subject: AutoFTP - Improvement, I think.
  4. Message-ID: <dfs.660602053@scotty>
  5. Date: 7 Dec 90 20:34:13 GMT
  6.  
  7. The AutoFTP program posted recently is great!  However, I find it
  8. quite annoying to have the IP address of the machine you want to
  9. contact hard-coded.
  10.  
  11. The following patch modifies the autoftp30.sh program to allow
  12. you to specify the host on the command line after the control
  13. file name.  So you can specify:
  14.  
  15.     sh autoftp30.sh getfile myhost@wherever.domain &
  16.  
  17. to connect to the specified host.  If you leave out the host argument,
  18. it defaults to the wired-in host.
  19.  
  20. --
  21. David Skoll
  22.  
  23. ---------------- CUT HERE FOR PATCH --------------------
  24. *** autoftp30.old    Fri Dec  7 15:29:57 1990
  25. --- autoftp30.sh    Fri Dec  7 15:30:19 1990
  26. ***************
  27. *** 47,56 ****
  28.   # it with the host name of your machine on which this program is run.
  29.   #   eg.,     RemoteHost="26.2.0.74"
  30.   #            LocalHost="shire.cs.psu.edu"
  31.   
  32. - RemoteHost="26.2.0.74" 
  33. - LocalHost="guest"
  34.   # Set the path name for the directory where three compiled C programs
  35.   # ftpget.c, nextfile.c and checkout.c are. This program assumes as 
  36.   # default that the three compiled programs are in $HOME/bin (a directory
  37. --- 47,56 ----
  38.   # it with the host name of your machine on which this program is run.
  39.   #   eg.,     RemoteHost="26.2.0.74"
  40.   #            LocalHost="shire.cs.psu.edu"
  41. + RemoteHost=$2
  42. + test 1$RemoteHost = 1 && RemoteHost="26.2.0.74"
  43. + LocalHost="guest"
  44.   
  45.   # Set the path name for the directory where three compiled C programs
  46.   # ftpget.c, nextfile.c and checkout.c are. This program assumes as 
  47.   # default that the three compiled programs are in $HOME/bin (a directory
  48. ***************
  49. *** 86,93 ****
  50.        echo "   'nextfile' and place it in your '$FtpLibDir' directory." ;
  51.        exit 2 ; }
  52.   
  53. ! test $# != 1 && 
  54. !    { echo "***Usage: sh autoftp30.sh in_file" ; exit 2; }
  55.   
  56.   exec 1>$$stdout 2>$$stderr
  57.   
  58. --- 86,93 ----
  59.        echo "   'nextfile' and place it in your '$FtpLibDir' directory." ;
  60.        exit 2 ; }
  61.   
  62. ! test $# != 1 && test $# != 2 &&
  63. !    { echo "***Usage: sh autoftp30.sh in_file [hostaddr]" ; exit 2; }
  64.   
  65.   exec 1>$$stdout 2>$$stderr
  66.