summaryrefslogtreecommitdiff
path: root/include/inject.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-03 05:25:11 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-05 12:18:22 +0100
commita80aed7ee1f125aa56ab8a87831201942d39284a (patch)
tree5b1c3f1812d668e3388d33745e5a2909ecf00fe3 /include/inject.sh
parentaa39abfff850e5d4435dc4924ed636364c908668 (diff)
lib.sh: add fe_ which is fx_ but err on find
In the mk script, we need fx_ to not return errors on the find command, since it's searching a bunch of directories where some of them may not exist. All other instances where fx_ is used, must return an error if the directory being searched doesn't exist. For this, fe_() is introduced, which does the same as fx_ but with this much stricter check. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/inject.sh')
-rw-r--r--include/inject.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/inject.sh b/include/inject.sh
index 0886adc8..2e821d86 100644
--- a/include/inject.sh
+++ b/include/inject.sh
@@ -283,7 +283,7 @@ extract_tbfw()
chkvars TBFW_size # size in bytes, matching TBFW's flash IC
x_ mkdir -p tmp
- x_ rm -f tmp/tb.bin && fx_ copy_tbfw "$appdir" -type f -name "TBT.bin"
+ x_ rm -f tmp/tb.bin && fe_ copy_tbfw "$appdir" -type f -name "TBT.bin"
x_ dd if=/dev/null of=tmp/tb.bin bs=1 seek=$TBFW_size
x_ cp "tmp/tb.bin" "$_dest"
@@ -421,7 +421,7 @@ patch_release_roms()
x_ mkdir -p "tmp"
if readkconfig; then
- fx_ prep_rom "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
+ fe_ prep_rom "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
[ "$nukemode" != "nuke" ] || \
printf "Make sure you inserted vendor files: %s\n" \
"$vguide" > "$tmpromdir/README.md" || :
@@ -571,7 +571,7 @@ modify_mac()
[ "$new_mac" != "restore" ] && x_ make -C util/nvmutil && \
x_ "$nvm" tmp/gbe setmac "$new_mac"
- fx_ newmac "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
+ fe_ newmac "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
printf "\nGbE NVM written to '%s':\n" "$archive"
x_ "$nvm" tmp/gbe dump | grep -v "bytes read from file" || :