From: Eric Anholt Date: Mon, 22 Jun 2020 23:54:10 +0000 (-0700) Subject: ci/bare-metal: Skip setting of unset variables at startup. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9079b53987e3d8dd82b0fa40a010f32524b13aeb;p=mesa.git ci/bare-metal: Skip setting of unset variables at startup. It's silly to be setting (and logging the setting of!) all the env vars we *didn't* set in a job. Reviewed-by: Tomeu Vizoso Part-of: --- diff --git a/.gitlab-ci/bare-metal/rootfs-setup.sh b/.gitlab-ci/bare-metal/rootfs-setup.sh index ba4cdf45bba..ff86054c4e6 100644 --- a/.gitlab-ci/bare-metal/rootfs-setup.sh +++ b/.gitlab-ci/bare-metal/rootfs-setup.sh @@ -39,7 +39,9 @@ for var in \ VK_DRIVER \ ; do val=`echo ${!var} | sed 's|"||g'` - echo "export $var=\"${val}\"" >> $rootfs_dst/set-job-env-vars.sh + if [ -n "$val" ]; then + echo "export $var=\"${val}\"" >> $rootfs_dst/set-job-env-vars.sh + fi done echo "Variables passed through:" cat $rootfs_dst/set-job-env-vars.sh