aboutsummaryrefslogtreecommitdiff
path: root/libreboot
diff options
context:
space:
mode:
authorAndrew Robbins <contact@andrewrobbins.info>2017-07-17 19:22:18 -0400
committerAndrew Robbins <contact@andrewrobbins.info>2017-07-18 21:43:22 -0400
commit56236fdb1d2faf540e1da199d3228606b944ddad (patch)
treed72fbb707bb2c8ad682c217b0f366430279d3dd4 /libreboot
parent59f05b2699208d9a8379fefc178d4db5c55cb1c8 (diff)
downloadlibrebootfr-56236fdb1d2faf540e1da199d3228606b944ddad.tar.gz
librebootfr-56236fdb1d2faf540e1da199d3228606b944ddad.zip
Simplify libreboot_setup() and libreboot()
Diffstat (limited to 'libreboot')
-rwxr-xr-xlibreboot20
1 files changed, 2 insertions, 18 deletions
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