summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2021-04-02 10:55:52 +0900
committerMarek Szyprowski <m.szyprowski@samsung.com>2021-11-16 13:00:22 +0100
commited3ace6530691875d8d5006e6faba0c20c26cafa (patch)
tree625de28107969ab7433f284799928651c9842e1a
parent2e05d6ff6215d738609a23360a573d438d59fdf9 (diff)
downloadu-boot-ed3ace6530691875d8d5006e6faba0c20c26cafa.tar.gz
u-boot-ed3ace6530691875d8d5006e6faba0c20c26cafa.tar.bz2
u-boot-ed3ace6530691875d8d5006e6faba0c20c26cafa.zip
scripts: tizen: sd_fusing: Fix error only with -b option
If there is only -b option without real binary name, there was error. Fix the error only with -b option. Change-Id: I4affff4ae5f567b81601727f33161251db2457c3 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rwxr-xr-xscripts/tizen/sd_fusing_rpi3.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh
index 103d2176a0..bb218178ed 100755
--- a/scripts/tizen/sd_fusing_rpi3.sh
+++ b/scripts/tizen/sd_fusing_rpi3.sh
@@ -31,7 +31,7 @@ function get_index_use_name () {
local -r binary_name=$1
for ((idx=0;idx<$PART_TABLE_ROW;idx++)); do
- if [ ${PART_TABLE[idx * ${PART_TABLE_COL} + 0]} == $binary_name ]; then
+ if [ ${PART_TABLE[idx * ${PART_TABLE_COL} + 0]} == "$binary_name" ]; then
return $idx
fi
done
@@ -71,7 +71,7 @@ function fusing_image () {
local -r fusing_img=$1
# get binary info using basename
- get_index_use_name $(basename $fusing_img)
+ get_index_use_name $(basename "$fusing_img")
local -r -i part_idx=$?
if [ $part_idx -ne $PART_TABLE_ROW ];then
@@ -370,7 +370,7 @@ function check_device () {
function print_logo () {
echo ""
- echo "Raspberry Pi downloader, version 2.0.5"
+ echo "Raspberry Pi downloader, version 2.0.6"
echo ""
}
@@ -378,9 +378,12 @@ print_logo
function add_fusing_binary() {
local declare binary_name=$1
- FUSING_BINARY_ARRAY[$FUSING_BINARY_NUM]=$binary_name
- FUSING_BINARY_NUM=$((FUSING_BINARY_NUM + 1))
+ if [ "$binary_name" != "" ]; then
+ FUSING_BINARY_ARRAY[$FUSING_BINARY_NUM]=$binary_name
+
+ FUSING_BINARY_NUM=$((FUSING_BINARY_NUM + 1))
+ fi
}