home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / SHAROS2.ZIP / SHAR.INF < prev   
Text File  |  1991-12-05  |  4KB  |  94 lines

  1. The UNIX program 'shar' (from "shell archive") puts readable text files
  2. together in a package from which they are easy to extract by feeding the
  3. package to the shell, typically 'sh'.  On UNIX systems, source code is
  4. frequently distributed as shell archives because it can pass through
  5. various mail systems without corruption.  In 1986 a version of shar was
  6. ported to CP/M and in addition to being able to construct shell archives
  7. the program could also decompose them.  Since CP/M did not have a Bourne
  8. shell shar was a useful tool for dealing with shell archives created on
  9. UNIX systems.
  10.  
  11. In late 1989 I made minimal changes to the program to compile it for OS/2
  12. 1.1 and MSDOS 3.3.  In common with its CP/M predecessor, when extracting
  13. files from a shell archive, that version of shar would trim file names to
  14. comply with the "8.3" length restrictions and would put all extracted
  15. files into the current directory.
  16.  
  17. Recently I was motivated to remove all the restrictions.  The enclosed
  18. version of shar is strictly for OS/2 HPFS.  It creates directories as
  19. needed and deposits extracted members into the correct places.  And no
  20. longer is any attempt made to rectify file names for FAT or CP/M file
  21. systems.  Code for VMS has been deleted; code for ULTRIX and the Amiga
  22. has been retained without verification.
  23.  
  24. There is a problem in constructing shell archives with this program which
  25. I do not know how to cure.  If you say:
  26.  
  27.     shar * >xyz
  28.  
  29. or some variant thereof then OS/2 creates the output file 'xyz' before
  30. the C library argument parser gets control.  This means that file xyz
  31. is included among the files to be archived and the archive grows until
  32. disk space is exhausted.
  33.  
  34. Operationally, the solution is simple enough - redirect the shar output
  35. to a file in a directory other than the one containing the source files.
  36. However that is not such an easy thing to remember.  I guess the proper
  37. answer is to avoid using redirection and devise a new command syntax,
  38. perhaps something like:-
  39.  
  40.     shar archive-name options files
  41.  
  42. Then the archive would not be created until after wildcard expansion of
  43. the command line has occurred and so would not confuse the program.  If
  44. anyone has a better idea I would love to hear it.
  45.  
  46. Because I envisage that this program is more likely to be used for
  47. decomposing shell archives rather than constructing them I have not
  48. bothered to fix the problem.
  49.  
  50. Jon Saxton
  51. December 1991
  52.  
  53.  
  54. Notes for previous versions follow:-
  55.  
  56. ------------------------------------------------------------------
  57.  
  58. This is a second-round port of the UNIXy "shar" (shell archive)
  59. program.  It can create or decompose a shell archive file.
  60.  
  61. Note that shell archives are NOT compressed in any way.  Their
  62. principle use is to combine multiple text files so as to simplify
  63. distribution of program sources and data.
  64.  
  65. Compiled with Microsoft C 5.1 for MS-DOS and OS/2.
  66.  
  67. The comments included with the CP/M version follow.
  68.  
  69. ------------------------------------------------------------------
  70.  
  71.                              READ_ME
  72.  
  73. This program is both a "shar" and a "unshar" program for those
  74. of us with no shell.
  75.  
  76. I have ported the recently posted shar.c to (z80) CP/M.  This
  77. distribution has been shar'd with this program.
  78.  
  79. When run under CP/M 3.0 with time-of-day supported,
  80. shar files created will have archive creation time included.
  81.  
  82. The uuencoded binary included (shar.com) looks for a file
  83. "ENVIRON.DAT" or "A:ENVIRON.DAT" for the environment variables.
  84. Variables used are "NAME=" and "ORGANIZATION=".
  85.  
  86. Uuencoding of the binary was done with the recently posted
  87. turbo-pascal uuencode.com program.
  88.  
  89. The attached binary was compiled using Manx Aztec C II v1.05g (z80).
  90.  
  91. Mike Kersenbrock (usenet:{decvax,ucbvax...}!tektronix!copper!michaelk)
  92. Aloha, Oregon
  93. 7/17/86
  94.