diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/board.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/board.sh b/src/board.sh index 7f0d031..dfd128d 100644 --- a/src/board.sh +++ b/src/board.sh @@ -30,12 +30,21 @@ register_board() find_board() { + local vendor="${1}" + local part="${2}" + local chip="${3}" + shift 3 local board= local fn= - board='x200_8mb' - - for fn in ${board_functions}; do - eval "board_${fn}() { board_${board}_${fn} \"\${@}\"; }" + for board in ${boards}; do + if ! board_${board}_match "${vendor}" "${part}" "${chip}"; then + continue + fi + for fn in ${board_functions}; do + eval "board_${fn}() { board_${board}_${fn} \"\${@}\"; }" + done + return 0 done + return 1 } |