From 5a0a24f555985c772b8414fe88a5862d23491956 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 11 Apr 2025 20:04:53 +0100 Subject: 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 --- script/trees | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script/trees') diff --git a/script/trees b/script/trees index 48d1603a..3cdd8dd4 100755 --- a/script/trees +++ b/script/trees @@ -174,7 +174,7 @@ configure_project() [ -z "$btype" ] || [ "${mode%config}" = "$mode" ] || return 1 [ -z "$mode" ] && build_dependencies - mdir="`pwd`/config/submodule/$project" + mdir="$xbmkpwd/config/submodule/$project" [ -n "$tree" ] && mdir="$mdir/$tree" [ -f "CHANGELOG" ] || check_project_hashes @@ -245,7 +245,7 @@ check_cross_compiler() x_ ./mk -f coreboot "${cbdir#src/coreboot/}" - export PATH="`pwd`/$cbdir/util/crossgcc/xgcc/bin:$PATH" + export PATH="$xbmkpwd/$cbdir/util/crossgcc/xgcc/bin:$PATH" export CROSS_COMPILE="${xarch% *}-" [ -n "$xlang" ] && export BUILD_LANGUAGES="$xlang" -- cgit v1.2.1