summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-27 17:22:35 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-27 17:22:35 (EDT)
commitc99d607df3b0bd19813a9139479358b26943ef72 (patch)
tree4615e1a6c4ebe5c61815a77274031426c867dba3 /src
parent851799c7fda1be5ebf0e28a095a6ed93ba789565 (diff)
downloadfirman.sh-c99d607df3b0bd19813a9139479358b26943ef72.zip
firman.sh-c99d607df3b0bd19813a9139479358b26943ef72.tar.gz
firman.sh-c99d607df3b0bd19813a9139479358b26943ef72.tar.bz2
find_board(): Finish
Diffstat (limited to 'src')
-rw-r--r--src/board.sh17
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
}