home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / unix_c / macintsh / macsend1.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1989-03-21  |  1.1 KB  |  46 lines

  1. #! /bin/sh
  2. # Shellscript for transmitting groups of files to a Macintosh via macput.
  3. # Invokes /bin/sh upon entry.
  4. # Files must be in three parts created by xbin : .rsrc, .data, .info
  5. # All other files will be sent as text files using the -u option.
  6. # This shellscript will ignore directories and files that are unreadable.
  7. # Wildcards may be used.  Thus, to transmit all files beginning with
  8. #    a capital letter, use "macsend [A-Z]*"
  9. # Upon termination of the operation, the Macintosh bell will ring
  10. #    three times.  This is your clue to wake up and see what you got!
  11. # Be sure that macput is in your path, otherwise the shellscript won't work!
  12. #
  13. # This shellscript is based on the original macsend.
  14. #    
  15. # Modifications done on April 20, 1985 by 
  16. #        
  17. # Chris Borton 
  18. # University of California at San Diego.
  19. # Undergraduate CS
  20. # sdcsvax!sdcc6!ix924
  21. #
  22. mesg n
  23. for f in $*
  24. do
  25.     if [ -f $f.* ]  && [ -r $f.* ] 
  26.     then 
  27.         if [ -r *.data ] && [ -r *.rsrc ] && [ -r *.info ] 
  28.         then
  29.             echo " macput $f"
  30.             macput $f
  31.         fi
  32.     fi
  33.     if [ -f $f ] && [ -r $f ]
  34.     then 
  35.         echo " macput -u $f"
  36.         macput -u $f
  37.     fi
  38. done
  39. echo -n " "
  40. echo "Downloads done!"
  41. echo -n 
  42. echo -n 
  43. echo -n 
  44. mesg y
  45.