tests/utils/env.sh.in: add comments and remove redundancy
This patch removes redundancy in `env.sh.in` by using a function which
sets a variable by name if it's empty and exports it.
This makes the file less error-prone: the variable name is written just
once, making it safer to add more.
The
export "${varname?}"
form is to make ShellCheck happy, even if a simple `export $varname`
would perfectly work in this context.
The function is unset at the end to avoid polluting the scope of
whatever sources `env.sh`.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: If392a6513b04b9e5fc2fd7b010b4071369e05b07
This page took 0.024875 seconds and 4 git commands to generate.