mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
blobutil/download: make more logic top-down
Basically, I really like OpenBSD coding style, and I want to replicate this, somewhat, in shell scripts.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
# SPDX-FileCopyrightText: 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
needs=""
|
||||
board="${1}"
|
||||
# A shorthand for each board, to avoid duplicating configs per flash size
|
||||
board_short=${board%%_*mb}
|
||||
@@ -57,6 +58,11 @@ done << EOF
|
||||
$(eval "awk ' /\{.*${board_short}.*}{/ {flag=1;next} /\}/{flag=0} flag { print }' resources/blobs/sources")
|
||||
EOF
|
||||
|
||||
Main() {
|
||||
Build_deps
|
||||
Download_needed
|
||||
}
|
||||
|
||||
Fail(){
|
||||
printf "\nERROR: $@\n"
|
||||
exit 1
|
||||
@@ -140,5 +146,4 @@ Extract_me(){
|
||||
printf "Truncated and cleaned me output to ${_me_destination}\n"
|
||||
}
|
||||
|
||||
Build_deps
|
||||
Download_needed
|
||||
Main
|
||||
|
||||
Reference in New Issue
Block a user