mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-21 05:35:02 +08:00
handle undefined machine output consistently
This commit is contained in:
@@ -469,8 +469,8 @@ write_status_info()
|
|||||||
[ -z "${MACHINE_OUTPUT}" ] && return 0
|
[ -z "${MACHINE_OUTPUT}" ] && return 0
|
||||||
|
|
||||||
exit_code="${1:-EXIT_FAILED}"
|
exit_code="${1:-EXIT_FAILED}"
|
||||||
bootloader_cur="${BOOTLOADER_CURRENT_VERSION}"
|
bootloader_cur="${BOOTLOADER_CURRENT_VERSION:-0}"
|
||||||
bootloader_new="${BOOTLOADER_UPDATE_VERSION}"
|
bootloader_new="${BOOTLOADER_UPDATE_VERSION:-0}"
|
||||||
vl805_cur="${VL805_CURRENT_VERSION}"
|
vl805_cur="${VL805_CURRENT_VERSION}"
|
||||||
vl805_new="${VL805_UPDATE_VERSION}"
|
vl805_new="${VL805_UPDATE_VERSION}"
|
||||||
|
|
||||||
@@ -486,8 +486,8 @@ EOF
|
|||||||
cat > "${MACHINE_OUTPUT}" <<EOF
|
cat > "${MACHINE_OUTPUT}" <<EOF
|
||||||
{
|
{
|
||||||
"EXITCODE": "${exit_code}",
|
"EXITCODE": "${exit_code}",
|
||||||
"BOOTLOADER_CURRENT": ${bootloader_cur:-0},
|
"BOOTLOADER_CURRENT": ${bootloader_cur},
|
||||||
"BOOTLOADER_LATEST": ${bootloader_new:-0},
|
"BOOTLOADER_LATEST": ${bootloader_new},
|
||||||
"VL805_CURRENT": "${vl805_cur}",
|
"VL805_CURRENT": "${vl805_cur}",
|
||||||
"VL805_LATEST": "${vl805_new}"
|
"VL805_LATEST": "${vl805_new}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user