From: Seung-Woo Kim Date: Fri, 2 Apr 2021 02:14:04 +0000 (+0900) Subject: scripts: tizen: sd_fusing: Fix to check file existence X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d3b7a3248b6d6d8d449b5e3e449cf61e68dacf7;p=platform%2Fkernel%2Fu-boot.git scripts: tizen: sd_fusing: Fix to check file existence The script can be executed with absent file. Fix to check file existence. Change-Id: I2409c73a5dcf4ca011e029b2e3fca9525cd6026a Signed-off-by: Seung-Woo Kim --- diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh index bb218178ed..1116b9b664 100755 --- a/scripts/tizen/sd_fusing_rpi3.sh +++ b/scripts/tizen/sd_fusing_rpi3.sh @@ -370,7 +370,7 @@ function check_device () { function print_logo () { echo "" - echo "Raspberry Pi downloader, version 2.0.6" + echo "Raspberry Pi downloader, version 2.0.7" echo "" } @@ -380,9 +380,13 @@ function add_fusing_binary() { local declare binary_name=$1 if [ "$binary_name" != "" ]; then - FUSING_BINARY_ARRAY[$FUSING_BINARY_NUM]=$binary_name + if [ -f "$binary_name" ]; then + FUSING_BINARY_ARRAY[$FUSING_BINARY_NUM]=$binary_name - FUSING_BINARY_NUM=$((FUSING_BINARY_NUM + 1)) + FUSING_BINARY_NUM=$((FUSING_BINARY_NUM + 1)) + else + echo "No such file: $binary_name" + fi fi }