]> git.ozlabs.org Git - petitboot/commitdiff
discover/grub2: Perform word-expansion non-destructively
authorJeremy Kerr <jk@ozlabs.org>
Tue, 28 Jan 2014 01:38:13 +0000 (09:38 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 30 Jan 2014 13:59:10 +0000 (21:59 +0800)
In order to implement for-loops, we may need to evaluate the same chunk
of script more than once, and perform that evaluation in a different
context (particularly, with different environment variables).

Currently, the process_expansion code destroys the result of the
parse-tree (ie, the token list) when performing expansions. This means
that we can only perform the expansions once.

This change preserves the token list while creating the argv array. This
means that we can expand the list multiple times.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

No differences found