Subject: Re: Source distributions vs. patches
To: None <netbsd-users@NetBSD.ORG>
From: Greg A. Woods <woods@most.weird.com>
List: netbsd-users
Date: 05/11/1998 23:22:41
[ On Mon, May 11, 1998 at 16:16:10 (-0500), Christofer C. Bell wrote: ]
> Subject: Re: Source distributions vs. patches
>
> Stan Brown wrote:
> > >> zcat $distfile | ( cd /usr/src | tar --unlink -xvpf - )
> >
> > Wouldn't that be gunzip $distfile | ( cd /usr/src | tar --unlink -xvpf
> > - )
> >
> > ?
> >
>
> Actually, I suppose it would be more correct to phrase it either as:
>
> gunzip -c $distfile | ( cd /usr/src | tar --unlink -xvpf - )
>
> or
>
> gzip -dc $distfile | ( cd /usr/src | tar --unlink -xvpf - )
>
> Since the -c option is required to unzip to standard out.
It would be possibly slightly more efficient (I've not peeked at the
'-z' implementation, so I may be way off here, but generally I'd expect
avoiding the pipeline to help out), and much easier to read, to just do
it like this:
cd /usr/src
tar --unlink -xzpf $distfile
(the '-v' probably isn't necessary, and can actually slow things down
significantly for folks using serial consoles, or very slow console code
on the likes of suns, etc.)
I suppose it might be even better to recommend using pax:
cd /usr/src
pax -rzf $distfile
--
Greg A. Woods
+1 416 443-1734 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>