From 56236fdb1d2faf540e1da199d3228606b944ddad Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Mon, 17 Jul 2017 19:22:18 -0400 Subject: Simplify libreboot_setup() and libreboot() --- libreboot | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'libreboot') diff --git a/libreboot b/libreboot index 7a872463..0c3db108 100755 --- a/libreboot +++ b/libreboot @@ -129,20 +129,11 @@ libreboot_setup() { root="$(readlink -f "$(dirname "$0")")" executable="$(basename "$0")" - local requirements="git" - local requirement_path - libreboot_setup_include - libreboot_setup_variables - for requirement in ${requirements}; do - requirement_path="$(which "${requirement}" || true)" + requirements 'tar' 'sed' 'gpg' 'sha256sum' 'git' - if [[ -z "${requirement_path}" ]]; then - printf '%s\n' "Missing requirement: ${requirement}" >&2 - exit 1 - fi - done + libreboot_setup_variables } libreboot_setup_include() { @@ -226,13 +217,6 @@ libreboot() { libreboot_setup "$@" - if [[ -z "${action}" ]] || [[ -z "${target}" ]]; then - libreboot_usage - exit 1 - fi - - requirements 'tar' 'sed' 'gpg' 'sha256sum' - if project_check "${target}"; then libreboot_project "${action}" "${target}" "$@" elif tool_check "${target}"; then -- cgit v1.2.3-70-g09d2