[OE-core] [PATCH 1/1] e2fsprogs/populate-extfs.sh: fix a problem on dash

Olof Johansson olof.johansson at axis.com
Fri Jan 24 15:17:01 UTC 2014


On 14-01-24 14:43 +0100, Richard Purdie wrote:
> On Mon, 2014-01-20 at 20:24 +0800, Robert Yang wrote:
> > The dash can't handle the or [[ in parameter expansion, for example:

Good to know. Interesting! Noting that escaping the [ would work,
but not applicable in this case.

> > 
> > A=/usr/bin/[[
> > B=[[
> > C="${A%$B}"

Would ${A%/*}/ work?

-                DIR="${DIR%$TGT}"
+                DIR="${DIR%/*}/"

It also has the advantage that it doesn't cause a fork (afaict,
the loop is being executed for every file in a rootfs directory
structure, that could cause a lot of forks).

(Disclaimer: I haven't tested this)

-- 
olofjn



More information about the Openembedded-core mailing list