home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
1
/
1308
/
README
< prev
next >
Wrap
Text File
|
1990-12-28
|
8KB
|
186 lines
Here is shar 3.24, an updated version of shar 3.11, derived from 'shar2'.
This offering is the work of many people. Lately, rhg@CPS.COM (Richard H.
Gumpertz) made significant changes to 3.11. colas@avahi.inria.fr (Colas
Nahaboo) and I made enhancements to unshar. The change history appears
at the bottom of this file.
This version's shar:
1) generates shell code which attempts to create missing directories
2) handle deviants sun, vax, pyramid, sequent, and SCO XENIX/UNIX
automatically; for system V systems I did not catch, add -DSYS5
to CFLAGS; for other BSD-like systems, add -DBSD42
3) if unsharing system's touch is Sys V compatible (allows touch -m),
the unshar process restores file dates
4) An archive name may be specified for includion in the header
of the shar files( -n switch)
5) allows automatic generation of "Submitted-by: who@where" &
"Archive-name: <name>/part##" headers
6) uses getopt; no good system library should be without a copy
but it is readily available (like look in unshar.c)
7) other chrome-plated junque
This version's unshar:
1) can change directory before unsharing
2) can unshar from standard in, from a collection of shars,
from a file containing multiple concatenated shars,
or a mixture of shar files and concatenated-shar files.
3) does not have an Social Security number.
------------------------ shar usage -----------------------------------
shar: No input files
shar 3.24
usage: shar [ options ] file [ file1 ... ] ]
-V produce "vanilla" shars demanding little of the unshar environment
-v verbose messages OFF while executing
-w don't check with 'wc -c' after unpack
-n Name of archive (documentation)
-a Generate Submitted-by: & Archive-name: headers
-s override automatically determined submitter name
-x don't overwrite existing files
-X interactively overwrite existing files (NOT FOR NET SHARS)
-b treat all files as binary, use uuencode
-t treat all files as text (default)
-C compress and uuencode all files
-p allow positional parameter options. The options "-b" and "-t"
and "-C" may be embedded, and files to the right of the
option will be processed in the specified mode
-M mixed mode. Determine if the files are text or
binary and archive correctly.
-P use temp files instead of pipes in the shar file
-c start the shar with a cut line
-f restore by filename only, rather than path
-dXXX use XXX to delimit the files in the shar
-oXXX (or -o XXX) output to file XXX.01 thru XXX.nn
-lXX limit output file size to XXk bytes (but don't split files)
-LXX limit output file size to XXk bytes (may split files)
-S read files to wrap from stdin, ignoring argument line
The -S option reads filenames one per line from stdin; input
format must be similar to 'find' output, except that if -p
is specified, -b, -t or -C may be used (on lines by themselves)
e.g., find . -type f -print | sort | shar -C -L50 -o /tmp/big
The 'o' option is required if the 'l' or 'L' option is used
The 'n' option is required if the 'a' option is used
The 'x' and 'L' options are incompatible
-a generates sharname/part## headers. If the -a argument contains
a '/', then /patch is not appended
The automatic submitter name is trivial: essentially `whoami`@`uname`
------------------------ unshar usage -----------------------------------
Unshar has no usage built in. It has default actions when invoked
with no arguments (read from stdin).
Usage: unshar [-c] [-C exit_line] [ -d directory ] [ file ] ...
The -d flag tells unshar to change directory before unsharing
It can unshar shar files concatenated in one file, with the
the "-c" command, which separates files by recognizing the
"exit 0" string at the beginning of a line
(The -C string option allows you to specify this string, thus
-c is equivalent to -C "exit 0")
--------------------- history -----------------------------------------
Changes since 3.11: kudos to rhg@CPS.COM (Richard H. Gumpertz)
1. The -l switch still specifies a maximum size for the generated
shar files, but now it prevents files from spanning shar parts.
Shars generated using this method may be unpacked in any order.
2. The old -l switch functionality is precisely emulated by using the
the -L switch. That is, archived files may be split across parts.
Shars generated using this method must still be unpacked in order.
3. The -C switch causes files to be compressed, then uuencoded.
Unpacking reverses the process.
4. The -P causes the shar to use temp files instead of pipes in
the unshar process.
5. The -f causes files to be resotred by name only (i.e., strip
directory portion of input filenames before placing the name
into the shar.
Changes since 3.20: kudos to colas@avahi.inria.fr (Colas Nahaboo)
1. The Archived-name: header no longer uses "/part" if there is
a "/" in the -n name. Thus
-n xyzzy procduces:
xyzzy/part01
xyzzy/part02
-n xyzzy/patch procduces:
xyzzy/patch01
xyzzy/patch02
-n xyzzy/patch01. procduces:
xyzzy/patch01.01
xyzzy/patch01.02
2. The Archive-name part number other than part01 had no leading zero
in the number.
3. The "Submitted-by:" header was missing the hyphen (minus for olde
UNIX hackres).
4. The unshar program may now unshar a whole mailbox or concatenation
of shar files.
-C "string" looks for "string" at the beginning of the line to
break the file into individual shar files
-c is equivalent to -C "exit 0"
This of course will only work if there is something in the shar
file recognizable to terminate the shar. Some shars dont have
"exit 0" at the end. However, a clue: most/many .signatures have
"--" on a line right before them.
5. Unshar -d (change directory) no longer makes argv files unreachable.
I had never used the feature until the other day. I guess the
author has used in only for unsharing from stdin.
Changes since 3.21: thanks to Adri Verhoef, <a3@rivm.UUCP>
1. Some vaxen do not run BSD. I guess I knew this, but -er-
here is Adri's note:
> Hi Warren,
>
> I encountered a problem trying to get 'shar3.21' to compile on System V
> on a vax. Yes, can you believe it? We run System V Release 3.0 on VAXen!
> The shar3.21 code assumes that you are BSD if you're on a vax. This is not
> always true! What I did to get the code compiled on System V, was:
> (+) edit the Makefile and add -DSYS5 to CFLAGS.
> (+) edit all the C-source files to circumcise compiler warnings
> ("SYS5 redefined").
>
He made a suggestion about having a localize.sh edit a distribution
Makefile, but for now, I'll just suggest you add -DSYS5 to CFLAGS
manually.
2. jhd@irfu.se (Jan Dj{rv, sorry about the screwed up character
translation, Jan) wrote man pages. Thanks!
Changes since 3.22: thanks to Dennis Boylan <dennis@nanovx>
1. The new -S option allows the list of files to be packed
to be read from the standard input rather than from the
command line.
2. A few purist checks were made to ensure fork() or malloc()
doesn't fail and excite the "if 20 hours of your time is
free then why isn't 200?" crowd (who probably will never see
this revision anyway :-))
Changes since 3.23:
1. The -V mode was added.
2. Altos doesn't like the '@' in filenames. The filename format
was changed. Thanks to rhg@cps.com.