Commit 1e27dd851f6e16421250436c810d6aa8597ec23e

Authored by Wojtek Porczyk
Committed by Phil Elwell
1 parent 6fa2ec0c

tools/update-pieeprom.sh: Fix cleanup exiting 1

When not signing the configuration (no -k option), there's no
$TMP_CONFIG file and `test -f "$TMP_CONFIG"` is false. The whole line
becomes false and the script exists 1 for `set -e`.

This commit fixes that by moving the test to `if` condition.

Fixes: d1a9a5c659e8 ("beta: Add support for secure-boot - see Readme.md")
Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
Showing 1 changed file with 1 additions and 1 deletions
tools/update-pieeprom.sh
@@ -25,7 +25,7 @@ die() { @@ -25,7 +25,7 @@ die() {
25 } 25 }
26 26
27 cleanup() { 27 cleanup() {
28 - [ -f "${TMP_CONFIG}" ] && rm -f "${TMP_CONFIG}" 28 + if [ -f "${TMP_CONFIG}" ]; then rm -f "${TMP_CONFIG}"; fi
29 } 29 }
30 30
31 usage() { 31 usage() {