mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
vendor.sh: split up setvfile()
split the actual bootstrapping to getvfile() setvfile only sets the config, but then it will call getvfile() to act on that config. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+1
-1
@@ -113,7 +113,7 @@ readkconfig()
|
||||
x_ rm -f "$xbmktmp/cbcfg"
|
||||
fx_ scankconfig x_ find "$boarddir/config" -type f
|
||||
eval "`setcfg "$xbmktmp/cbcfg" 1`"
|
||||
setvfile "$@" && return 1; :
|
||||
setvfile "$@" || return 1; :
|
||||
}
|
||||
|
||||
scankconfig()
|
||||
|
||||
+16
-14
@@ -219,20 +219,8 @@ setvfile()
|
||||
[ -n "$vcfg" ] && check_vcfg && for c in $cvchk; do
|
||||
eval "[ \"\${$c}\" = \"/dev/null\" ] && continue"
|
||||
eval "[ -z \"\${$c}\" ] && continue"
|
||||
|
||||
# valid vcfg. proceed to download files
|
||||
eval "`setcfg "$vfile"`"
|
||||
|
||||
bootstrap
|
||||
|
||||
[ $# -gt 0 ] && getfiles
|
||||
[ $# -gt 0 ] && return 1 # download
|
||||
|
||||
fx_ prep x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
||||
( check_vendor_hashes ) || err "$archive: Can't verify hashes"
|
||||
|
||||
return 1
|
||||
done && return 0; return 1
|
||||
getvfile "$@" && return 0
|
||||
done && return 1; :
|
||||
}
|
||||
|
||||
check_vcfg()
|
||||
@@ -242,6 +230,20 @@ check_vcfg()
|
||||
[ -f "$vfile" ] || err "'$archive', '$board': $vfile missing"; :
|
||||
}
|
||||
|
||||
getvfile()
|
||||
{
|
||||
# valid vcfg. proceed to download files
|
||||
eval "`setcfg "$vfile"`"
|
||||
|
||||
bootstrap
|
||||
|
||||
[ $# -gt 0 ] && getfiles
|
||||
[ $# -gt 0 ] && return 0 # download
|
||||
|
||||
fx_ prep x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
|
||||
( check_vendor_hashes ) || err "$archive: Can't verify hashes"; :
|
||||
}
|
||||
|
||||
bootstrap()
|
||||
{
|
||||
cbdir="src/coreboot/$tree"
|
||||
|
||||
Reference in New Issue
Block a user