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
Wrap
Text File
|
2009-11-06
|
4KB
|
128 lines
'shar09.shar'
SHAR is a utility which combines printable ASCII files
into a single archive file.
To understand SHAR, you should first understand what a
"sharfile" is. This may sound backwards, but there is a reason.
Sharfiles existed before SHAR. This is not magic. A sharfile
is an Unix convention. SHAR is short for "shell archive" or
because the standar Unix shell is called sh, "sh archive".
If you are using Unix, you don't need SHAR. A shell archive
could be constructed by the standard Unix utilities and a
shell script. Furthermore, to unpack a sharfile you would
only need to type in the filename. All the embedded commands
would be sufficient to create the files properly.
So SHAR is primarily a utility for non-Unix computer
users who wish to use a SHAR format to archive files or to
unpack sharfiles from other computers, most of which are
probably running Unix. Since SHAR is a loose convention rather
than a fixed format, there are many types of sharfiles. This
utility will unpack many types of sharfiles, but not all.
Similarly, most Shar-like utilities (and of course the standard
Unix 'sh') will unpack sharfiles created with this utility.
But some utilities may have problems with the files this
utility creates. There are not guarantees of portability.
Revision History:
88/07/24 Patches by RJ Fehl incorporated fixing an old bug.
88/06/22 Patch by Peter Dibble to handle sharfiles without
line prefixing and other minor changes by Jim Omura.
88/01/27 Ported to OS-9 6809 by Jim Omura.
This is a *partially* tested version of Shar.
It will create a sharfile and unpack a "shar"files created by
itself, the 68K version, and many other Sharfiles, but not all
the options have been confirmed.
87/05/22 OS-9 version patch by Dieter Stoll to fix 'mkdir' error
report.
Installation:
OS-9 users (6809 and 68K):
If you have 'make' and are using OS-9 6809, you can compile
this with 'make -f=make.os9'. If you are using OS-9 68K you should
be able to modify this make fairly easily.
If you do not have 'make' you will have to add
#define OS9
to the top of 'shar.h'. If your 'make' utility defaults
to defining OS9, you should remove the '-dOS9' from the
CFLAGS variable in the 'makefile'.
Other Systems:
NOTE: The following will no longer work because I have broken
the program down into smaller source modules. I have
included these installation instructions to help in the creation
of the necessary 'makefile's. -- Jim O.
AMIGA: cc -DAMIGA shar.c
ln -o shar shar.o -lc
VMS: cc/DEFINE=VMS shar.c
link shar,sys$library:vaxcrtl/lib
shar :== $dev:[dir]shar
U**X: cc -O -DULTRIX -o shar shar.c -lc
General:
This is an early version of Wecker's Shar.c with "first stage"
porting to OS-9 68K completed. Use the Unix instructions for now.
The code should be redone in some areas for cleaner logic, but
has been tested and will create a 'shar' file. Furthermore, it
will unpack many types of shar files. The only problem I've
uncovered is that it will overwrite existing files without giving
an error.
Many thanks to Gary Kendall without whom I would have abandonned
the effort.
Cheers! -- Jim Omura
The following are all the instructions I received:
Creating a shar file:
AMIGA: shar >foo.shar -a makefile *.h *.c
VMS: create a batch job that executes:
$ shar -a makefile *.h *.c
edit the batch .LOG file (which is your shar file)
U**X: shar -a makefile *.h *.c >foo.shar
OS-9 shar file1 file2 file3 >foo.shar
OSK shar makefile *.h *.c >foo.shar
(P.S. the -a switch means do all options)
Extracting from a shar file:
AMIGA: shar -u foo.shar
VMS: shar -u foo.shar
U**X: shar -u foo.shar or sh foo.shar
Just typing "shar" will yield a usage line. (Doc: thanks for the code to
base this off of).
OS-9: shar -u foo.shar
OSK: shar -u foo.shar
For OS-9 and OSK: shar -?
gives usage.