ci: Convert generate-env.sh to a POSIX compliant script

This shell script will be used in environments (e.g. LAVA) where bash
is not available, hence let's make sure it is POSIX compliant in order
to be able to execute on any modern shell interpreter.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
This commit is contained in:
Cristian Ciocaltea 2022-02-23 13:43:48 +02:00 committed by Marge Bot
parent e7ab2ba94e
commit 9904ea2c76
1 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
for var in \
ASAN_OPTIONS \
@ -106,8 +106,8 @@ for var in \
VK_CPU \
VK_DRIVER \
VK_ICD_FILENAMES \
; do
if [ -n "${!var+x}" ]; then
echo "export $var=${!var@Q}"
fi
;
do
eval val=\$${var}
[ -z "$val" ] || echo "export $var='$val'"
done