From 64a3fad80a59318dd9cde51b35a7d6cb386a0134 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 30 Jul 2019 23:01:18 -0400 Subject: [PATCH] Update sd_fusing.sh Please add a https://www.shellcheck.net plugin to your editor of choice. --- sd_fuse/sd_fusing.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sd_fuse/sd_fusing.sh b/sd_fuse/sd_fusing.sh index 451013f1198..ac1921c3937 100755 --- a/sd_fuse/sd_fusing.sh +++ b/sd_fuse/sd_fusing.sh @@ -7,17 +7,17 @@ # abort() { - echo $1 + echo "$1" exit 1 } -[ -z $1 ] && abort "usage: $0 " -[ -z ${UBOOT} ] && UBOOT=${PWD}/u-boot.bin -[ ! -f ${UBOOT} ] && abort "error: ${UBOOT} is not exist" +[ -z "$1" ] && abort "usage: $0 " +[ -z "${UBOOT}" ] && UBOOT=${PWD}/u-boot.bin +[ ! -f "${UBOOT}" ] && abort "error: ${UBOOT} is not exist" -sudo dd if=$UBOOT of=$1 conv=fsync,notrunc bs=512 seek=1 +sudo dd if="$UBOOT" of="$1" conv=fsync,notrunc bs=512 seek=1 sync -sudo eject $1 +sudo eject "$1" echo Finished.