summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-05 06:26:38 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-05 12:19:18 +0100
commit93fef4734b469bf33d0adf1e7328f8540b191183 (patch)
treecd484673e1b67085441fd19d4a54bf593a078065
parentd083840ca04bd34a95889feede97cc37d029b64f (diff)
inject.sh: simplify extract_intel_me_bruteforce()
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/inject.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/inject.sh b/include/inject.sh
index 667a03f8..6aceb52c 100644
--- a/include/inject.sh
+++ b/include/inject.sh
@@ -165,9 +165,11 @@ extract_intel_me_bruteforce()
[ "${cdir#/a}" != "$cdir" ] && cdir="${cdir#/}"
cd "$cdir" || err "extract_intel_me: !cd \"$cdir\" - $dontflash"
for i in *; do
- e "$_metmp" f && break
+ c=0 && e "$_metmp" f && break
[ -L "$i" ] && continue
- if [ -f "$i" ]; then
+ [ -e "$i" ] || continue
+ [ -d "$i" ] && extract_intel_me_bruteforce "$cdir/$i" && c=1
+ if [ $c -eq 0 ] && [ -f "$i" ]; then
_r="-r" && [ -n "$mfs" ] && _r=""
"$mecleaner" $mfs $_r -t -O "$sdir/vendorfile" \
-M "$_metmp" "$i" && break
@@ -176,10 +178,6 @@ extract_intel_me_bruteforce()
_7ztest="${_7ztest}a"
extract_archive "$i" "$_7ztest" || continue
extract_intel_me_bruteforce "$cdir/$_7ztest"
- elif [ -d "$i" ]; then
- extract_intel_me_bruteforce "$cdir/$i"
- else
- continue
fi
cdir="$1"; [ "${cdir#/a}" != "$cdir" ] && cdir="${cdir#/}"
cd "$cdir" || :