mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 19:26:22 +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"
|
x_ rm -f "$xbmktmp/cbcfg"
|
||||||
fx_ scankconfig x_ find "$boarddir/config" -type f
|
fx_ scankconfig x_ find "$boarddir/config" -type f
|
||||||
eval "`setcfg "$xbmktmp/cbcfg" 1`"
|
eval "`setcfg "$xbmktmp/cbcfg" 1`"
|
||||||
setvfile "$@" && return 1; :
|
setvfile "$@" || return 1; :
|
||||||
}
|
}
|
||||||
|
|
||||||
scankconfig()
|
scankconfig()
|
||||||
|
|||||||
+16
-14
@@ -219,20 +219,8 @@ setvfile()
|
|||||||
[ -n "$vcfg" ] && check_vcfg && for c in $cvchk; do
|
[ -n "$vcfg" ] && check_vcfg && for c in $cvchk; do
|
||||||
eval "[ \"\${$c}\" = \"/dev/null\" ] && continue"
|
eval "[ \"\${$c}\" = \"/dev/null\" ] && continue"
|
||||||
eval "[ -z \"\${$c}\" ] && continue"
|
eval "[ -z \"\${$c}\" ] && continue"
|
||||||
|
getvfile "$@" && return 0
|
||||||
# valid vcfg. proceed to download files
|
done && return 1; :
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_vcfg()
|
check_vcfg()
|
||||||
@@ -242,6 +230,20 @@ check_vcfg()
|
|||||||
[ -f "$vfile" ] || err "'$archive', '$board': $vfile missing"; :
|
[ -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()
|
bootstrap()
|
||||||
{
|
{
|
||||||
cbdir="src/coreboot/$tree"
|
cbdir="src/coreboot/$tree"
|
||||||
|
|||||||
Reference in New Issue
Block a user