On Wed, Jul 26, 2017 at 06:50:26PM -0500, Bruce Dubbs wrote:
> Ken Moffat wrote:
> > With expat-2.2.2 the tests are invoked from a run.sh script.
> > 
> > But that script starts:
> > #! /usr/bin/env bash
> > 
> > (I didn't know you could put a space after the shebang).
> 
> Sure, it's just a command line.  You can pass options on the line too.
> 
> > At this point we do not yet have /usr/bin/env (from coreutils), but
> > we do have /bin/bash.  The following sed, run before configure,
> > solves this:
> > 
> > sed -i 's%^.*env bash$%#!/bin/bash%' run.sh.in
> 
> Good catch.  Running test in a partial environment like LFS is tricky.
> 
> How about:
> 
> sed -i 's|usr/bin/env |bin/|'  run.sh.in
> 
> Or even:
> 
> cat > run.sh.in << EOF
> #! /bin/bash
> exec "$@"
> EOF
> 
> which is all we need.
> 
>   -- Bruce

Your sed is simpler than mine, and shorter (in terms of the number of
lines anyone needs to read), but either should do fine.

ĸen
-- 
I live in a city. I know sparrows from starlings.  After that
everything is a duck as far as I'm concerned.  -- Monstrous Regiment
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to