home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / pd2.lzh / SHAR / shar.doc < prev   
Text File  |  2009-11-06  |  4KB  |  128 lines

  1. 'shar09.shar'
  2.  
  3.      SHAR is a utility which combines printable ASCII files
  4. into a single archive file.
  5.  
  6.      To understand SHAR, you should first understand what a
  7. "sharfile" is.  This may sound backwards, but there is a reason.
  8. Sharfiles existed before SHAR.  This is not magic.  A sharfile
  9. is an Unix convention.  SHAR is short for "shell archive" or
  10. because the standar Unix shell is called sh, "sh archive".
  11. If you are using Unix, you don't need SHAR.  A shell archive
  12. could be constructed by the standard Unix utilities and a
  13. shell script.  Furthermore, to unpack a sharfile you would
  14. only need to type in the filename.  All the embedded commands
  15. would be sufficient to create the files properly.
  16.  
  17.      So SHAR is primarily a utility for non-Unix computer
  18. users who wish to use a SHAR format to archive files or to
  19. unpack sharfiles from other computers, most of which are
  20. probably running Unix.  Since SHAR is a loose convention rather
  21. than a fixed format, there are many types of sharfiles.  This
  22. utility will unpack many types of sharfiles, but not all.
  23. Similarly, most Shar-like utilities (and of course the standard
  24. Unix 'sh') will unpack sharfiles created with this utility.
  25. But some utilities may have problems with the files this
  26. utility creates.  There are not guarantees of portability.
  27.  
  28. Revision History:
  29.  
  30. 88/07/24  Patches by RJ Fehl incorporated fixing an old bug.
  31.  
  32. 88/06/22  Patch by Peter Dibble to handle sharfiles without
  33.           line prefixing and other minor changes by Jim Omura.
  34.  
  35. 88/01/27  Ported to OS-9 6809 by Jim Omura.
  36.           This is a *partially* tested version of Shar.
  37. It will create a sharfile and unpack a "shar"files created by
  38. itself, the 68K version, and many other Sharfiles, but not all
  39. the options have been confirmed.
  40.  
  41. 87/05/22  OS-9 version patch by Dieter Stoll to fix 'mkdir' error
  42.           report.
  43.  
  44. Installation:
  45.  
  46. OS-9 users (6809 and 68K):
  47.  
  48.      If you have 'make' and are using OS-9 6809, you can compile
  49. this with 'make -f=make.os9'.  If you are using OS-9 68K you should
  50. be able to modify this make fairly easily.
  51.  
  52.      If you do not have 'make' you will have to add
  53.  
  54. #define OS9
  55.  
  56. to the top of 'shar.h'.  If your 'make' utility defaults
  57. to defining OS9, you should remove the '-dOS9' from the
  58. CFLAGS variable in the 'makefile'.
  59.  
  60. Other Systems:
  61.  
  62. NOTE:  The following will no longer work because I have broken
  63.        the program down into smaller source modules.  I have
  64. included these installation instructions to help in the creation
  65. of the necessary 'makefile's. -- Jim O.
  66.  
  67.         AMIGA:  cc -DAMIGA shar.c
  68.                 ln -o shar shar.o -lc
  69.  
  70.         VMS:    cc/DEFINE=VMS shar.c
  71.                 link shar,sys$library:vaxcrtl/lib
  72.                 shar :== $dev:[dir]shar
  73.  
  74.         U**X:   cc -O -DULTRIX -o shar shar.c -lc
  75.  
  76.  
  77. General:
  78.  
  79.     This is an early version of Wecker's Shar.c with "first stage"
  80. porting to OS-9 68K completed.  Use the Unix instructions for now.
  81. The code should be redone in some areas for cleaner logic, but
  82. has been tested and will create a 'shar' file.  Furthermore, it
  83. will unpack many types of shar files.  The only problem I've
  84. uncovered is that it will overwrite existing files without giving
  85. an error.
  86.  
  87.     Many thanks to Gary Kendall without whom I would have abandonned
  88. the effort.
  89.  
  90. Cheers! -- Jim Omura
  91.  
  92.     The following are all the instructions I received:
  93.  
  94. Creating a shar file:
  95.  
  96.         AMIGA:  shar >foo.shar -a makefile *.h *.c
  97.  
  98.         VMS:    create a batch job that executes:
  99.                 $ shar -a makefile *.h *.c
  100.                 edit the batch .LOG file (which is your shar file)
  101.  
  102.         U**X:   shar -a makefile *.h *.c >foo.shar
  103.  
  104.         OS-9    shar file1 file2 file3 >foo.shar
  105.  
  106.         OSK     shar makefile *.h *.c >foo.shar
  107.  
  108.                 (P.S. the -a switch means do all options)
  109.  
  110. Extracting from a shar file:
  111.  
  112.         AMIGA:  shar -u foo.shar
  113.  
  114.         VMS:    shar -u foo.shar
  115.  
  116.         U**X:   shar -u foo.shar        or    sh foo.shar
  117.  
  118. Just typing "shar" will yield a usage line. (Doc: thanks for the code to
  119. base this off of).
  120.  
  121.         OS-9:   shar -u foo.shar
  122.  
  123.         OSK:    shar -u foo.shar
  124.  
  125. For OS-9 and OSK: shar -?
  126. gives usage.
  127.  
  128.