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 7LINTDIR="$( 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 15for mobodir in $(${FIND_FILES} src/mainboard | sed -n 's,^\(src/mainboard/[^/]*/[^/]*\)/.*$,\1,p'|sort|uniq); do 16 board_info="$mobodir/board_info.txt" 17 if ! [ -f "$board_info" ]; then 18 echo "No $board_info found" 19 continue 20 fi 21 category="$(sed -n 's#^Category: \(.*\)$#\1#p' < "$board_info")" 22 case "$category" in 23 desktop|server|laptop|half|mini|settop|"eval"|sbc|emulation|misc) 24 ;; 25 "") 26 echo "$board_info doesn't contain 'Category' tag" 27 continue 28 ;; 29 *) 30 echo "$board_info specifies unknown category '$category'" 31 continue 32 ;; 33 esac 34done 35 36exit 0 37