diff options
author | Leah Rowe <leah@libreboot.org> | 2025-04-11 20:04:53 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-04-11 20:04:53 +0100 |
commit | 5a0a24f555985c772b8414fe88a5862d23491956 (patch) | |
tree | 17a636d738385a1fc3a9adc6db8d0899901e6f23 /include/vendor.sh | |
parent | a25a29cfbb7578ed44e862cc6a4ff019c340f499 (diff) |
lbmk: unified PWD handling (work directory)
instead of running pwd all the time, run it once in lib.sh,
and export PWD.
for lbmk-specific use of PWD, use xbmkpwd, which contains
the value of PWD as was set by the pwd utility in lib.sh.
many parts of lbmk rely on pwd, and it *must* be correct.
this change adds basic error handling, since pwd can in
fact return errors in some cases.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/vendor.sh')
-rw-r--r-- | include/vendor.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/vendor.sh b/include/vendor.sh index 9cb872a5..740f01b0 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -3,10 +3,10 @@ # Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com> # Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org> -e6400_unpack="`pwd`/src/bios_extract/dell_inspiron_1100_unpacker.py" -me7updateparser="`pwd`/util/me7_update_parser/me7_update_parser.py" -pfs_extract="`pwd`/src/biosutilities/Dell_PFS_Extract.py" -uefiextract="`pwd`/elf/uefitool/uefiextract" +e6400_unpack="$xbmkpwd/src/bios_extract/dell_inspiron_1100_unpacker.py" +me7updateparser="$xbmkpwd/util/me7_update_parser/me7_update_parser.py" +pfs_extract="$xbmkpwd/src/biosutilities/Dell_PFS_Extract.py" +uefiextract="$xbmkpwd/elf/uefitool/uefiextract" vendir="vendorfiles" appdir="$vendir/app" cbcfgsdir="config/coreboot" @@ -14,7 +14,7 @@ hashfiles="vendorhashes blobhashes" # blobhashes for backwards compatibility dontflash="!!! AN ERROR OCCURED! Please DO NOT flash if injection failed. !!!" vfix="DO_NOT_FLASH_YET._FIRST,_INJECT_FILES_VIA_INSTRUCTIONS_ON_LIBREBOOT.ORG_" vguide="https://libreboot.org/docs/install/ivy_has_common.html" -tmpromdel="`pwd`/tmp/DO_NOT_FLASH" +tmpromdel="$xbmkpwd/tmp/DO_NOT_FLASH" cv="CONFIG_HAVE_ME_BIN CONFIG_ME_BIN_PATH CONFIG_INCLUDE_SMSC_SCH5545_EC_FW \ CONFIG_SMSC_SCH5545_EC_FW_FILE CONFIG_KBC1126_FIRMWARE CONFIG_KBC1126_FW1 \ @@ -152,9 +152,9 @@ extract_intel_me() { e "$mecleaner" f not && $err "$cbdir: me_cleaner missing. $dontflash" - cdir="`pwd`/$appdir" - _me="`pwd`/$_dest" - _metmp="`pwd`/tmp/me.bin" + cdir="$xbmkpwd/$appdir" + _me="$xbmkpwd/$_dest" + _metmp="$xbmkpwd/tmp/me.bin" mfs="" && [ "$ME11bootguard" = "y" ] && mfs="--whitelist MFS" && \ chkvars ME11delta ME11version ME11sku ME11pch @@ -489,8 +489,8 @@ readcfg() cbdir="src/coreboot/$tree" cbfstool="elf/cbfstool/$tree/cbfstool" rmodtool="elf/cbfstool/$tree/rmodtool" - mecleaner="`pwd`/$cbdir/util/me_cleaner/me_cleaner.py" - kbc1126_ec_dump="`pwd`/$cbdir/util/kbc1126/kbc1126_ec_dump" + mecleaner="$xbmkpwd/$cbdir/util/me_cleaner/me_cleaner.py" + kbc1126_ec_dump="$xbmkpwd/$cbdir/util/kbc1126/kbc1126_ec_dump" cbfstool="elf/cbfstool/$tree/cbfstool" ifdtool="elf/ifdtool/$tree/ifdtool" [ -n "$IFD_platform" ] && ifdprefix="-p $IFD_platform"; : |