Changeset - 4d7f924adca6
[Approved]
0 1 0
Dennis Fink - 2 years ago 2022-06-08 22:22:40
dennis.fink@c3l.lu
Use cd ... || exit in case cd fails.

https://www.shellcheck.net/wiki/SC2164
1 file changed with 3 insertions and 3 deletions:
2 comments (0 inline, 2 general)
flashEMMC.sh
Show inline comments
 
@@ -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 ../..
 
}
Dennis Fink (metalgamer) 2 years and 5 months ago comment on pull request "Fixed some shellcheck warnings"

Status change: Under review

x 2 years and 5 months ago comment on pull request "Fixed some shellcheck warnings"

Status change: Approved

Answer is "ok" (via Matrix chat)
2 comments (0 inline, 2 general)