program to separate xlisp distribution files

utzoo!decvax!microsof!uw-beave!jim utzoo!decvax!microsof!uw-beave!jim
Fri Apr 1 14:48:15 AEST 1983


Once again I am prompted to post my "shell archiver".  I didn't invent
the idea, but I did write this particular version.

This is a shell script which takes as input the names of a bunch of
files.  It produces as output a shell script, which when run extracts
the original files.  I have seen some much fancier versions, but this
one works and it is still what I use.  I find it to be a convenient way
to bundle up a bunch of files for distribution, for example in
net.sources, because it doesn't require any special software on the
receiving end, just a standard Unix shell.

Put this script in a file called shar, and use it by typing:

	shar ArchiveName file1 file2 ...

Here it is:

AR=$1
shift
echo "# The rest of this file is a shell script which will extract:" >>$AR
echo "# $*" >>$AR
for i do
	echo a - $i
	echo "echo x - $i" >>$AR
	echo "cat >$i <<'!Funky!Stuff!'" >>$AR
	cat $i >>$AR
	echo "!Funky!Stuff!" >>$AR
done



More information about the Comp.sources.unix mailing list