mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-13 06:49:52 +02:00
update/project/trees: split up main()
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -19,12 +19,8 @@ main()
|
||||
|
||||
[ -z "${1}" ] && err "project name not specified"
|
||||
project="${1}" && shift 1
|
||||
cfgsdir="config/${project}"
|
||||
[ -d "${cfgsdir}" ] || err "unsupported project name"
|
||||
|
||||
targets=$(listitems "${cfgsdir}")
|
||||
[ $# -gt 0 ] && targets=$@
|
||||
[ -z "${targets}" ] && err "No targets for project: ${project}"
|
||||
configure_targets $@
|
||||
|
||||
for x in ${targets}; do
|
||||
x_ rm -f "${cfgsdir}/"*/seen
|
||||
@@ -32,6 +28,18 @@ main()
|
||||
done
|
||||
}
|
||||
|
||||
configure_targets()
|
||||
{
|
||||
cfgsdir="config/${project}"
|
||||
[ -d "${cfgsdir}" ] || err "unsupported project name"
|
||||
|
||||
targets=$(listitems "${cfgsdir}")
|
||||
[ $# -gt 0 ] && targets=$@
|
||||
[ -z "${targets}" ] || return 0
|
||||
|
||||
err "No targets for project: ${project}"
|
||||
}
|
||||
|
||||
download_for_target()
|
||||
{
|
||||
_target="${1}"
|
||||
|
||||
Reference in New Issue
Block a user