vendor/download: check whether configs exist first

Signed-off-by: Leah Rowe <leah@libreboot.org>
9020vga
Leah Rowe 2023-12-23 07:48:15 +00:00
parent 392932797b
commit 465077bc4a
1 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,12 @@ main()
detect_firmware() detect_firmware()
{ {
_cfg_exists="n"
for _chk_file in "${boarddir}/config/"*; do
[ -f "${_chk_file}" ] && _cfg_exists="y" && break
done
[ "${_cfg_exists}" = "n" ] && return 1
set -- "${boarddir}/config/"* set -- "${boarddir}/config/"*
. "${1}" 2>/dev/null . "${1}" 2>/dev/null