From 656823d295a2740118428490099a33e09f76fe68 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Thu, 20 Jul 2017 23:12:55 -0400 Subject: Create array TOOL_ACTIONS_GENERIC_IGNORE_CHECK Located in libs/tool, this array's elements are compared with actions in TOOLS_ACTIONS_GENERIC when libreboot_setup_tool_actions() is called. This makes it simpler to add/remove actions which should/shouldn't have a corresponding check function in TOOL_ACTIONS. --- libreboot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libreboot') diff --git a/libreboot b/libreboot index 1363e880..94eba109 100755 --- a/libreboot +++ b/libreboot @@ -155,12 +155,14 @@ libreboot_setup_include() { libreboot_setup_tool_actions() { local -i tool_actions_count="${#TOOL_ACTIONS_GENERIC[@]}" + local ignore="${TOOL_ACTIONS_GENERIC_IGNORE_CHECK[*]}" + local -a tool_actions for ((i=0; i<"${tool_actions_count}"; i++)); do tool_actions+=("${TOOL_ACTIONS_GENERIC[i]}") - if [[ "${TOOL_ACTIONS_GENERIC[i]}" == @(extract) ]]; then + if [[ "${TOOL_ACTIONS_GENERIC[i]}" == !(${ignore// /|}) ]]; then tool_actions+=("${TOOL_ACTIONS_GENERIC[i]/%/_check}") fi done -- cgit v1.2.3-70-g09d2