
16 Mar
2020
16 Mar
'20
10:24 p.m.
On Sun, Mar 15, 2020 at 05:42:58PM -0600, Simon Glass wrote:
Bash allows for variables to expand only if non-empty:
$ var=test $ echo ${var:+"$var"} test $ echo ${var:+"-k $var"} -k test $ var= $ echo ${var:+"-k $var"}
Use this feature to avoid the workaround.
Signed-off-by: Simon Glass sjg@chromium.org
Reviewed-by: Tom Rini trini@konsulko.com
--
Tom