diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2017-07-17 18:53:59 -0400 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2017-07-18 21:43:22 -0400 |
commit | 101e236f3dbb277926f1b460e303d425d3483075 (patch) | |
tree | 6cc3b17dec129369be99090346855ccaa3aac4c3 /libreboot | |
parent | b2e3c041723a0416f9b678ead9bee100db4a4775 (diff) | |
download | librebootfr-101e236f3dbb277926f1b460e303d425d3483075.tar.gz librebootfr-101e236f3dbb277926f1b460e303d425d3483075.zip |
Clean up case forms in libreboot_{project,tool}()
Diffstat (limited to 'libreboot')
-rwxr-xr-x | libreboot | 30 |
1 files changed, 12 insertions, 18 deletions
@@ -77,8 +77,8 @@ libreboot_project() { project="$1" shift - case ${action} in - "sources") + case "${action}" in + 'sources') ( set +e @@ -86,12 +86,12 @@ libreboot_project() { project_action_arguments "download" "${project}" "$@" && return 0 ) ;; - "produce") + 'produce') for action in "build" "install" "release"; do project_action_arguments "${action}" "${project}" "$@" done ;; - "test") + 'test') for action in ${PROJECT_ACTIONS}; do project_action_arguments "${action}" "${project}" "$@" done @@ -115,20 +115,14 @@ libreboot_tool() { tool="$1" shift - case ${action} in - *) - if ! tool_function_check "${tool}" "${action}"; then - libreboot_usage - exit 1 - fi - - if [[ "${action}" == "usage" ]]; then - tool_action "${action}" "${tool}" "$@" - else - tool_action_arguments_recursive "${action}" "${tool}" "$@" - fi - ;; - esac + if ! tool_function_check "${tool}" "${action}"; then + libreboot_usage + exit 1 + elif [[ "${action}" == 'usage' ]]; then + tool_action "${action}" "${tool}" "$@" + else + tool_action_arguments_recursive "${action}" "${tool}" "$@" + fi } libreboot_setup() { |