From cc799aa8ce9245b7a655f5095cf524c1922f5e3e Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 3 Feb 2019 16:24:10 +0200 Subject: [PATCH] fwupdate: minor extract improvement --- board/common/overlay/sbin/fwupdate | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 3af3349ba6..ad79d1998a 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -350,17 +350,17 @@ function run_pre_upgrade() { } function do_extract() { - echo "extracting..." - - trap cleanup_on_exit EXIT - - rm -f ${FW_FILE_EXTR} - rm -f ${BOOT_READY_FILE} - if ! [[ -f ${FW_FILE_GZ} || -f ${FW_FILE_XZ} ]]; then echo "firmware file not downloaded" 1>&2 exit 1 fi + + rm -f ${FW_FILE_EXTR} + rm -f ${BOOT_READY_FILE} + + echo "extracting..." + + trap cleanup_on_exit EXIT format="gz" if [[ -f ${FW_FILE_XZ} ]]; then