mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 10:14:13 +08:00
ci/firmware: Allow calling firmware as sourced script
Most of our build scripts are sourced rather than executed in a subshell, so they inherit our environment. Allow our firmware script to do the same by not exiting when we have no firmware to download, as is the case on arm32. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
This commit is contained in:
parent
24a9fe6655
commit
ff97a8b006
@ -7,16 +7,15 @@ set -e
|
||||
|
||||
ROOTFS=$1
|
||||
FIRMWARE_FILES=$2
|
||||
FIRMWARE=$(jq -s '.' $(echo "$FIRMWARE_FILES"))
|
||||
|
||||
if [ -z "$FIRMWARE" ] || [ "$(echo "$FIRMWARE" | jq '. | length')" -eq 0 ]; then
|
||||
echo "FIRMWARE is not set or is empty."
|
||||
exit
|
||||
if [ -n "${FIRMWARE_FILES:-}" ]; then
|
||||
FIRMWARE=$(jq -s '.' $(echo "$FIRMWARE_FILES"))
|
||||
else
|
||||
FIRMWARE=""
|
||||
fi
|
||||
|
||||
if ! echo "$FIRMWARE" | jq empty; then
|
||||
echo "FIRMWARE contains invalid JSON."
|
||||
exit
|
||||
fi
|
||||
|
||||
for item in $(echo "$FIRMWARE" | jq -c '.[]'); do
|
||||
|
Loading…
Reference in New Issue
Block a user