Skip to content

Commit dc79d0a

Browse files
committed
base-files: board_detect: Address shellcheck warnings
* SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. * SC2086 (info): Double quote to prevent globbing and word splitting. * SC2091 (warning): Remove surrounding $() to avoid executing output (or use eval if intentional). Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
1 parent b947064 commit dc79d0a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

package/base-files/files/bin/board_detect

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ CFG=$1
44

55
[ -n "$CFG" ] || CFG=/etc/board.json
66

7-
[ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
7+
if [ -d "/etc/board.d/" ] && [ ! -s "$CFG" ]; then
88
for a in $(ls /etc/board.d/*); do
9-
[ -s $a ] || continue;
10-
$(. $a)
9+
[ -s "$a" ] || continue
10+
(. "$a")
1111
done
12-
}
12+
fi
1313

1414
[ -s "$CFG" ] || return 1

0 commit comments

Comments
 (0)