Vladimir Serbinenko | fb2a9a9 | 2014-08-15 02:06:00 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # This file is part of the coreboot project. |
| 3 | # |
| 4 | # Copyright (C) 2014 Vladimir Serbinenko <phcoder@gmail.com> |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; version 2 of the License, or (at your option) |
| 9 | # any later version. |
| 10 | # |
| 11 | # This program is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
Vladimir Serbinenko | fb2a9a9 | 2014-08-15 02:06:00 +0200 | [diff] [blame] | 16 | # DESCR: Check that every board has a meaningful board_info.txt |
| 17 | |
| 18 | LC_ALL=C export LC_ALL |
Martin Roth | 92658db | 2016-03-16 15:58:23 -0600 | [diff] [blame] | 19 | for mobodir in $(git ls-files src/mainboard | sed -n 's,^\(src/mainboard/[^/]*/[^/]*\)/.*$,\1,p'|sort|uniq); do |
Vladimir Serbinenko | fb2a9a9 | 2014-08-15 02:06:00 +0200 | [diff] [blame] | 20 | board_info="$mobodir/board_info.txt" |
| 21 | if ! [ -f "$board_info" ]; then |
Vladimir Serbinenko | b46f589 | 2014-08-17 23:53:14 +0200 | [diff] [blame] | 22 | echo "No $board_info found" |
Martin Roth | 92658db | 2016-03-16 15:58:23 -0600 | [diff] [blame] | 23 | continue |
Vladimir Serbinenko | fb2a9a9 | 2014-08-15 02:06:00 +0200 | [diff] [blame] | 24 | fi |
| 25 | category="$(sed -n 's#^Category: \(.*\)$#\1#p' < "$board_info")" |
| 26 | case "$category" in |
| 27 | desktop|server|laptop|half|mini|settop|"eval"|sbc|emulation|misc) |
| 28 | ;; |
| 29 | "") |
Vladimir Serbinenko | b46f589 | 2014-08-17 23:53:14 +0200 | [diff] [blame] | 30 | echo "$board_info doesn't contain 'Category' tag" |
Martin Roth | 92658db | 2016-03-16 15:58:23 -0600 | [diff] [blame] | 31 | continue |
Vladimir Serbinenko | fb2a9a9 | 2014-08-15 02:06:00 +0200 | [diff] [blame] | 32 | ;; |
| 33 | *) |
Vladimir Serbinenko | b46f589 | 2014-08-17 23:53:14 +0200 | [diff] [blame] | 34 | echo "$board_info specifies unknown category '$category'" |
Martin Roth | 92658db | 2016-03-16 15:58:23 -0600 | [diff] [blame] | 35 | continue |
Vladimir Serbinenko | fb2a9a9 | 2014-08-15 02:06:00 +0200 | [diff] [blame] | 36 | ;; |
| 37 | esac |
| 38 | done |
| 39 | |
| 40 | exit 0 |