From e28aa8019489eca8fc36fc62bb6ff29705dbce99 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Fri, 20 Jan 2023 17:16:44 +0000 Subject: [PATCH] rpi-update: Only copy kernel files if they exist --- rpi-update | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rpi-update b/rpi-update index 27339a2..4566a17 100755 --- a/rpi-update +++ b/rpi-update @@ -357,13 +357,14 @@ function update_firmware { fi if [[ ${SKIP_KERNEL} -eq 0 ]]; then if [[ ${WANT_32BIT} -eq 1 ]]; then - cp "${FW_REPOLOCAL}/"kernel.img "${FW_REPOLOCAL}/"kernel7.img "${FW_PATH}/" + [[ -e "${FW_REPOLOCAL}/"kernel.img ]] && cp "${FW_REPOLOCAL}/"kernel.img "${FW_PATH}/" + [[ -e "${FW_REPOLOCAL}/"kernel7.img ]] && cp "${FW_REPOLOCAL}/"kernel7.img "${FW_PATH}/" if [[ ${WANT_PI4} -eq 1 ]]; then - cp "${FW_REPOLOCAL}/"kernel7l.img "${FW_PATH}/" + [[ -e "${FW_REPOLOCAL}/"kernel7l.img ]] && cp "${FW_REPOLOCAL}/"kernel7l.img "${FW_PATH}/" fi fi if [[ ${WANT_64BIT} -eq 1 ]]; then - cp "${FW_REPOLOCAL}/"kernel8.img "${FW_PATH}/" + [[ -e "${FW_REPOLOCAL}/"kernel8.img ]] && cp "${FW_REPOLOCAL}/"kernel8.img "${FW_PATH}/" fi if [[ -n $(shopt -s nullglob; echo "${FW_REPOLOCAL}/"*.dtb*) ]]; then cp "${FW_REPOLOCAL}/"*.dtb* "${FW_PATH}/"