2020-12-24 20:06:38 +01:00
|
|
|
#!/usr/bin/env sh
|
2020-05-10 20:09:31 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2014-08-15 02:06:00 +02:00
|
|
|
#
|
|
|
|
# DESCR: Check that every board has a meaningful board_info.txt
|
|
|
|
|
|
|
|
LC_ALL=C export LC_ALL
|
2016-03-16 22:58:23 +01:00
|
|
|
for mobodir in $(git ls-files src/mainboard | sed -n 's,^\(src/mainboard/[^/]*/[^/]*\)/.*$,\1,p'|sort|uniq); do
|
2014-08-15 02:06:00 +02:00
|
|
|
board_info="$mobodir/board_info.txt"
|
|
|
|
if ! [ -f "$board_info" ]; then
|
2014-08-17 23:53:14 +02:00
|
|
|
echo "No $board_info found"
|
2016-03-16 22:58:23 +01:00
|
|
|
continue
|
2014-08-15 02:06:00 +02:00
|
|
|
fi
|
|
|
|
category="$(sed -n 's#^Category: \(.*\)$#\1#p' < "$board_info")"
|
|
|
|
case "$category" in
|
|
|
|
desktop|server|laptop|half|mini|settop|"eval"|sbc|emulation|misc)
|
|
|
|
;;
|
|
|
|
"")
|
2014-08-17 23:53:14 +02:00
|
|
|
echo "$board_info doesn't contain 'Category' tag"
|
2016-03-16 22:58:23 +01:00
|
|
|
continue
|
2014-08-15 02:06:00 +02:00
|
|
|
;;
|
|
|
|
*)
|
2014-08-17 23:53:14 +02:00
|
|
|
echo "$board_info specifies unknown category '$category'"
|
2016-03-16 22:58:23 +01:00
|
|
|
continue
|
2014-08-15 02:06:00 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|