From 8511b1e7a4f91e61b3e0afb66919afb72d046557 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 27 Oct 2015 21:16:00 -0400 Subject: board_get(): New function --- (limited to 'src') diff --git a/src/board.sh b/src/board.sh index 42a123d..624d88d 100644 --- a/src/board.sh +++ b/src/board.sh @@ -19,6 +19,7 @@ board_functions='get_name get_id match get_dists' boards='' +board='' board_chip='' register_board() @@ -36,7 +37,6 @@ find_board() local part="${2}" local chip="${3}" shift 3 - local board= local fn= for board in ${boards}; do @@ -51,9 +51,16 @@ find_board() board_chip="${chip}" return 0 done + board='' return 1 } +board_get() +{ + printf '%s' "${board}" + return 0 +} + board_get_chip() { printf '%s' "${board_chip}" -- cgit v0.9.1