[PATCH v1] env: setenv add resolve value option
Tom Rini
trini at konsulko.com
Tue Nov 2 17:44:54 CET 2021
On Tue, Nov 02, 2021 at 03:19:14PM +0800, Artem Lapkin wrote:
> Add possibility setup env variable with additional resolving vars inside
> value.
>
> Usage examples
>
> => setenv a hello
> => setenv b world
> => setenv c '${a} ${b}'
> => setenv -r d '${c}! ${a}...'
> => printenv d
> d=hello world! hello...
>
> /* internal usage example */
> env_resolve("d", "${c}! ${a}...");
> /* d="hello world! hello..." */
>
> Notes
>
> Resolving works only for ${var} "bracket" and didn't workd for
> "unbracket" $var
>
> => setenv -r d '$c! $a...'
> => printenv d
> d=$c! $a...
>
> Signed-off-by: Artem Lapkin <art at khadas.com>
The high level problem I have with this patch is that we keep going back
to "we really need to update to a modern hush (or other shell) rather
than patching new features in to our ancient fork".
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20211102/b35d2b89/attachment.sig>
More information about the U-Boot
mailing list