In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 26:
	CONTRIB_DIR=$(dirname $(readlink -f $0))
                              ^---------------^ SC2046 (warning): Quote this to prevent word splitting.
                                            ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	CONTRIB_DIR=$(dirname $(readlink -f "$0"))


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 32:
	find $SRCDIR | while read FILE; do
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                             ^--^ SC2162 (info): read without -r will mangle backslashes.

Did you mean: 
	find "$SRCDIR" | while read FILE; do


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 34:
                DIR="${FILE#$SRCDIR}"
                            ^-----^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean: 
                DIR="${FILE#"$SRCDIR"}"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 35:
                DIR="${DIR%$TGT}"
                           ^--^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean: 
                DIR="${DIR%"$TGT"}"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 38:
		[ ! -z "$DIR" ] || continue
                  ^-- SC2236 (style): Use -n instead of ! -z.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 39:
		[ ! -z "$TGT" ] || continue
                  ^-- SC2236 (style): Use -n instead of ! -z.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 47:
		STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" $FILE)
                                                                                               ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" "$FILE")


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 48:
		eval $STAT
                     ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		eval "$STAT"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 58:
			LINK_TGT=$(readlink $FILE)
                                            ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			LINK_TGT=$(readlink "$FILE")


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 86:
	INODE_DIR=`mktemp -d` || exit 1
                  ^---------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
	INODE_DIR=$(mktemp -d) || exit 1


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 87:
	for i in `find $SRCDIR -type f -links +1 -printf 'INODE=%i###FN=%p\n'`; do
                 ^-- SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop.
                 ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	for i in $(find "$SRCDIR" -type f -links +1 -printf 'INODE=%i###FN=%p\n'); do


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 88:
		eval `echo $i | sed 's$###$ $'`
                     ^------------------------^ SC2046 (warning): Quote this to prevent word splitting.
                     ^------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                           ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		eval $(echo "$i" | sed 's$###$ $')


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 89:
		echo ${FN#$SRCDIR} >>$INODE_DIR/$INODE
                     ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                          ^-----^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.
                                     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		echo "${FN#"$SRCDIR"}" >>"$INODE_DIR"/"$INODE"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 92:
	for i in `ls $INODE_DIR`; do
                 ^-------------^ SC2045 (error): Iterating over ls output is fragile. Use globs.
                 ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	for i in $(ls "$INODE_DIR"); do


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 94:
		SRC=`head -1 $INODE_DIR/$i`
                    ^---------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                             ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                        ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		SRC=$(head -1 "$INODE_DIR"/"$i")


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 96:
		for TGT in `sed -n -e '1!p' $INODE_DIR/$i`; do
                           ^-----------------------------^ SC2013 (info): To read lines rather than words, pipe/redirect to a 'while read' loop.
                           ^-----------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                                            ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                       ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		for TGT in $(sed -n -e '1!p' "$INODE_DIR"/"$i"); do


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 100:
		LN_CNT=`cat $INODE_DIR/$i | wc -l`
                       ^-------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                            ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                       ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		LN_CNT=$(cat "$INODE_DIR"/"$i" | wc -l)


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 104:
	rm -fr $INODE_DIR
               ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	rm -fr "$INODE_DIR"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/populate-extfs.sh line 105:
} | $DEBUGFS -w -f - $DEVICE
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
} | $DEBUGFS -w -f - "$DEVICE"

For more information:
  https://www.shellcheck.net/wiki/SC2045 -- Iterating over ls output is fragi...
  https://www.shellcheck.net/wiki/SC2044 -- For loops over find output are fr...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...