From 4d7f924adca60db15c5a81a9dcfe5d5c115a3f80 2022-06-08 22:22:40 From: Dennis Fink Date: 2022-06-08 22:22:40 Subject: [PATCH] Use cd ... || exit in case cd fails. https://www.shellcheck.net/wiki/SC2164 --- diff --git a/flashEMMC.sh b/flashEMMC.sh index 61f6afcb89dccedb5c16db963a766336b8a14467..ab10835f3ec77f6a3ded48fa9350dada29d85695 100755 --- a/flashEMMC.sh +++ b/flashEMMC.sh @@ -58,9 +58,9 @@ createEXT4fs() { cdToScript() { TMP=$(dirname "$0") - cd "$TMP" + cd "$TMP" || exit mkdir flashEMMC - cd flashEMMC + cd flashEMMC || exit } unmountFS() { @@ -91,7 +91,7 @@ mountFS() { } flashBootloader() { - cd root/boot + cd root/boot || exit ./sd_fusing.sh /dev/"${DEV}" cd ../.. }