diff options
author | Leah Rowe <leah@libreboot.org> | 2025-10-04 22:36:11 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-10-04 22:42:42 +0100 |
commit | c1d6cd22c2390c7317b8996f9b993697491c1eab (patch) | |
tree | 120aebfa5328e7699759a087d15a2fd0aeafc3f7 /include/tree.sh | |
parent | f358cfaa55219c537de0eb534997be36cba93f14 (diff) |
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 <leah@libreboot.org>
Diffstat (limited to 'include/tree.sh')
-rw-r--r-- | include/tree.sh | 6 |
1 files changed, 3 insertions, 3 deletions
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 |