diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2017-07-17 19:22:18 -0400 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2017-07-18 21:43:22 -0400 |
commit | 56236fdb1d2faf540e1da199d3228606b944ddad (patch) | |
tree | d72fbb707bb2c8ad682c217b0f366430279d3dd4 | |
parent | 59f05b2699208d9a8379fefc178d4db5c55cb1c8 (diff) | |
download | librebootfr-56236fdb1d2faf540e1da199d3228606b944ddad.tar.gz librebootfr-56236fdb1d2faf540e1da199d3228606b944ddad.zip |
Simplify libreboot_setup() and libreboot()
-rwxr-xr-x | libreboot | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -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 |