home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / unix / srcs2xbi.sha < prev    next >
Encoding:
Text File  |  1985-05-05  |  1.3 KB  |  52 lines

  1. #! /bin/sh
  2. # Shellscript for xbin'ing groups of files to one directory for macput.
  3. # Invokes /bin/sh upon entry.
  4. # This shellscript will ignore directories and files that are unreadable,
  5. #     as well as any files without the line "(This file must be converted...)"
  6. #
  7. # Wildcards may be used.  Thus, to xbin all files in the range 240 to 249
  8. #    use "macxbin 24*"
  9. # Upon termination of the operation, the Macintosh bell will ring
  10. #    two times.  This is your clue to wake up and see what is waiting.
  11. #     This might be deleted if you plan to do this in the background and 
  12. #    don't want to be bothered.
  13. #
  14. # Done on May 5, 1985 by 
  15. # Chris Borton (sdcsvax!sdcc6!ix924)
  16. # University of California at San Diego. (Undergraduate CS)
  17. #
  18. mesg n
  19. for f in $*
  20. do
  21.     if [ -f $f ]  && [ -r $f ]
  22.     then
  23.         fgrep "(This file must be converted" $f > /tmp/BinHextest
  24.  
  25.         if [ -s /tmp/BinHextest ]
  26.         then
  27.             rm /tmp/BinHextest
  28.  
  29. #  Replace "/hp1h/ixmaster/ix924/hcx" with the full path to the directory you 
  30. #      wish to put the files to download.
  31.  
  32.             cp $f /hp1h/ixmaster/ix924/hcx
  33.             cd /hp1h/ixmaster/ix924/hcx
  34.             xbin $f
  35.             rm $f
  36.  
  37. #  Replace "/usr/spool/news/net/sources/mac" with the path to your 
  38. #      net.sources.mac if it is different.
  39.  
  40.             cd /usr/spool/news/net/sources/mac
  41.         else
  42.             rm /tmp/BinHextest
  43.         fi
  44.     fi
  45. done
  46. echo -n " "
  47. echo "Downloads ready!"
  48. echo -n 
  49. echo -n 
  50. mesg y
  51.