Using patch instead of unshar

Bakul Shah bvs at light.uucp
Thu May 3 06:53:24 AEST 1990


The other day as i was applying a zillion patches to the perl3
tree, which went pretty smoothly, by the way, it struck me that a
patchfile is functionally sooo... close to a sharfile!  Patching
with patch is not only entertaining, it is also faster than
grinding through unshar, sh, cat/sed, wc and a tmpfile or two.
Patch runs on more machines than shell and everyone can get patch
sources.  It is also all you need for upgrades and patch is safer
than using sh (and can be made safer -- yet another option to
touch files only in the current tree).

What we need is a version of diff such that

	diff -c /dev/null source-tree

will produce an initial `patchfile' which when fed to patch will
reproduce the source-tree.  Better still would be

	mkpatch [-f old-tree] [-s patchfile-size] new-tree

which creates a initial patchfile or one by diff'ing new-tree
against old-tree, creates a patchlevel.h if one does not exist,
and may be, handles file permissions, safely transports
unprintable chars, (though these are is perhaps best handled in a
makefile) etc.  Patch creates directories as needed but it may
have to be extended to handle file permissions and unprintable
chars.

With a few more changes, such as interface to sccs/rcs or a
separate checksum file (ala zoo) to be checked by patch, we can
have a pretty nifty software source distribution system!  Now
*that* would be worth standardizing.

Comments?  Any takers?

-- Bakul Shah
   bvs at BitBlocks.COM
   ..!{ames,att,decwrl,pyramid,sun,uunet}!amdcad!light!bvs



More information about the Alt.sources.d mailing list