Debian Codegraph @

util/lint/lint-stable-005-board-status

raw symbols SCIP
1 #!/usr/bin/env sh
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 #
4 # DESCR: Check that every board has a meaningful board_info.txt
5
6
7 LINTDIR="$(
8 cd -- "$(dirname "$0")" > /dev/null 2>&1 || return
9 pwd -P
10 )"
11
12 # shellcheck source=helper_functions.sh
13 . "${LINTDIR}/helper_functions.sh"
14
15 for mobodir in $(${FIND_FILES} src/mainboard | sed -n 's,^\(src/mainboard/[^/]*/[^/]*\)/.*$,\1,p' \
16 | grep -v '/common$' | sort -u); do
17
18 board_info="$mobodir/board_info.txt"
19 if ! [ -f "$board_info" ]; then
20 echo "No $board_info found"
21 continue
22 fi
23 category="$(sed -n 's#^Category: \(.*\)$#\1#p' < "$board_info")"
24 case "$category" in
25 desktop|server|laptop|half|mini|settop|"eval"|sbc|emulation|misc)
26 ;;
27 "")
28 echo "$board_info doesn't contain 'Category' tag"
29 continue
30 ;;
31 *)
32 echo "$board_info specifies unknown category '$category'"
33 continue
34 ;;
35 esac
36 done
37
38 exit 0