[Bug 37] Fix the kernel header situation (again)

Marc Heerdink marc_heerdink at softhome.net
Thu May 31 03:42:20 PDT 2001

Gerard Beekmans sent these bits on Sat, 12 May 2001 13:57:45 -0400:
> On Sat, May 12, 2001 at 01:45:08PM -0400, Gerard Beekmans wrote:
> > > I've changed this to "cp -a"
> > > 
> > > -a is the same as -dpR, which preserves file attributes and also
> leaves
> > > symlinks intact in case there are any (or if not yet, they could
> always
> > > appear in the future).
> > 
> > I forgot that asm was a symlink. Let's see what can be done about,
> while
> > still using cp -a (i'd just feel better if permissions and symlinks
> > inside linux/ and asm/ were preserved)
> The command I came up with is ugly:
> cp -a ../src/linux/include/`ls -l --color=none \
> ../src/linux/include/asm|cut -f 28 -d " "` asm
> pretty ain't it
> The cut may not work depending on how people have setup their ls, or
> aliased, or whatever. There's too much to take into account. It will
> proably more reliable when piped through awk. The point is, it it worth
> it? I just checked the include/linux and asm directories and I didn't
> see any symlinks in there. It may change, so we'd then waste a big of
> disk space.
> I just don't think a complicated setup using cp, ls and awk is worth
> it in this case. I'll change it back to cp -r. If somebody has more time
> than me to find a nice solution that works in all cases, feel free to
> update cvs of course. I'm just going to concentrate on other things now,
> else pre3 will never be done.

How about:

cp -a ../src/linux/include/$(expr "`ls -ld ../src/linux/include/asm`" :
'.*-> \(.*\)') asm

This is a quite clean solution IMHO.

There is no programming language, no matter how structured,
that will prevent programmers from writing bad programs.
- L. Flon

Marc Heerdink
marc_heerdink at softhome.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-book/attachments/20010531/61914764/attachment.sig>

More information about the lfs-book mailing list