diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-14 16:48:25 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-14 16:48:25 +0100 |
commit | 8d5475ed5b55b01290d09ff06a29ae3c6da119fa (patch) | |
tree | 572cfe8bf17cc5ccef1a18257f4dce463b9ed3fc | |
parent | 21867b7d80562ce822525fca63688908f1ca59b8 (diff) |
get.sh: simplify fetch_submodules() config check
We already do what the old code does in setcfg, by
virtue of the fact that the st variable is later
checked, after loading this config conditionally,
where the st variable is otherwise blank.
We can avoid the unnecessary work after loading
the config, by returning if the config is absent.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | include/get.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/get.sh b/include/get.sh index e582fdd8..120d4264 100644 --- a/include/get.sh +++ b/include/get.sh @@ -66,8 +66,7 @@ fetch_submodule() { mcfgdir="$mdir/${1##*/}"; eval \ "`setvars "" subhash subgit subgit_bkup subcurl subcurl_bkup st`" - [ ! -f "$mcfgdir/module.cfg" ] || . "$mcfgdir/module.cfg" || \ - err "! . $mcfgdir/module.cfg" + eval "`setcfg "$mcfgdir/module.cfg" 0`" for xt in git curl; do _seval="if [ -n \"\$sub$xt\" ] || [ -n \"\$sub${xt}_bkup\" ]" |