Skip to content

Commit

Permalink
Fix board_detect script to pass shellcheck
Browse files Browse the repository at this point in the history
Before this change, the board_detect script was
parsing the output of ls to get files in /etc/board.d.
The correct method is to use globs.

Signed-off-by: Matteo Iervasi <matteo.iervasi@edalab.it>
  • Loading branch information
miervasi-edalab committed Mar 27, 2024
1 parent d01aecd commit 57050bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/base-files/files/bin/board_detect
Expand Up @@ -5,8 +5,8 @@ CFG=$1
[ -n "$CFG" ] || CFG=/etc/board.json

[ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
for a in $(ls /etc/board.d/*); do
[ -s $a ] || continue;
for a in /etc/board.d/*; do
[ -s "$a" ] || continue;
$(. $a)
done
}
Expand Down

0 comments on commit 57050bd

Please sign in to comment.