From 38472cfdca9f6c61c84cbd84d5206e02716becfd Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Thu, 20 Jul 2017 23:30:42 -0400 Subject: Create array PROJECT_ACTIONS_GENERIC_IGNORE_CHECK Located in libs/project, this array's elements are compared with actions in PROJECTS_ACTIONS_GENERIC when libreboot_setup_project_actions() is called. This makes it simpler to add/remove actions which should/shouldn't have a corresponding check function in PROJECT_ACTIONS. --- libreboot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libreboot') diff --git a/libreboot b/libreboot index 94eba109..59795d09 100755 --- a/libreboot +++ b/libreboot @@ -172,12 +172,14 @@ libreboot_setup_tool_actions() { libreboot_setup_project_actions() { local -i project_actions_count="${#PROJECT_ACTIONS_GENERIC[@]}" + local ignore="${PROJECT_ACTIONS_GENERIC_IGNORE_CHECK[*]}" + local -a project_actions for ((i=0; i<"${project_actions_count}"; i++)); do project_actions+=("${PROJECT_ACTIONS_GENERIC[i]}") - if [[ "${PROJECT_ACTIONS_GENERIC[i]}" == !(usage|clean) ]]; then + if [[ "${PROJECT_ACTIONS_GENERIC[i]}" == !(${ignore// /|}) ]]; then project_actions+=("${PROJECT_ACTIONS_GENERIC[i]/%/_check}") fi done -- cgit v1.2.3-70-g09d2