From c1d6cd22c2390c7317b8996f9b993697491c1eab Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 4 Oct 2025 22:36:11 +0100 Subject: xbmk: don't call mkdir. use xbmkdir (new function) xbmkdir checks if a directory exists, before running mkdir, and then still uses -p i was testing xbmk on arch linux today, and noticed that it errored out when a directory already exists. i'm mitigating against buggy or differently behaving mkdir implementations this way, by wrapping around it. Signed-off-by: Leah Rowe --- include/tree.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/tree.sh') diff --git a/include/tree.sh b/include/tree.sh index 254f738d..19060110 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -432,7 +432,7 @@ project_up_to_date() shift 3 - x_ mkdir -p "$XBMK_CACHE/$hashdir" + x_ xbmkdir "$XBMK_CACHE/$hashdir" if [ -f "$XBMK_CACHE/$hashdir/$project$hashname" ]; then read -r old_hash < "$XBMK_CACHE/$hashdir/$project$hashname" \ @@ -485,7 +485,7 @@ check_cross_compiler() xgccargs="crossgcc-$xfix UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS" x_ ./mk -f coreboot "${cbdir#src/coreboot/}" - x_ mkdir -p "elf/coreboot/$tree" # TODO: is this needed? + x_ xbmkdir "elf/coreboot/$tree" # TODO: is this needed? export PATH="$xbmkpwd/$cbdir/util/crossgcc/xgcc/bin:$PATH" export CROSS_COMPILE="${xarch% *}-" @@ -748,7 +748,7 @@ check_makefile() copy_elf() { if [ -f "$listfile" ]; then - x_ mkdir -p "$dest_dir" + x_ xbmkdir "$dest_dir" fi if [ -f "$listfile" ]; then -- cgit v1.2.1