mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-20 21:13:36 +08:00
Merge pull request #467 from hanzyd/master
rpi-eeprom-update: Follow links when looking for latest EEPROM
This commit is contained in:
@@ -308,7 +308,7 @@ BOOTLOADER_UPDATE_VERSION=0
|
|||||||
getBootloaderUpdateVersion() {
|
getBootloaderUpdateVersion() {
|
||||||
BOOTLOADER_UPDATE_VERSION=0
|
BOOTLOADER_UPDATE_VERSION=0
|
||||||
match=".*/pieeprom-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].bin"
|
match=".*/pieeprom-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].bin"
|
||||||
latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)"
|
latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -follow -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)"
|
||||||
if [ -f "${latest}" ]; then
|
if [ -f "${latest}" ]; then
|
||||||
BOOTLOADER_UPDATE_VERSION=$(strings "${latest}" | grep BUILD_TIMESTAMP | sed 's/.*=//g')
|
BOOTLOADER_UPDATE_VERSION=$(strings "${latest}" | grep BUILD_TIMESTAMP | sed 's/.*=//g')
|
||||||
BOOTLOADER_UPDATE_IMAGE="${latest}"
|
BOOTLOADER_UPDATE_IMAGE="${latest}"
|
||||||
|
|||||||
Reference in New Issue
Block a user