summaryrefslogtreecommitdiff
path: root/include/rom.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-10-04 22:36:11 +0100
committerLeah Rowe <leah@libreboot.org>2025-10-04 22:42:42 +0100
commitc1d6cd22c2390c7317b8996f9b993697491c1eab (patch)
tree120aebfa5328e7699759a087d15a2fd0aeafc3f7 /include/rom.sh
parentf358cfaa55219c537de0eb534997be36cba93f14 (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/rom.sh')
-rw-r--r--include/rom.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/rom.sh b/include/rom.sh
index 4de49eee..2efe4919 100644
--- a/include/rom.sh
+++ b/include/rom.sh
@@ -19,7 +19,7 @@ buildser()
x_ make -C "$sersrc" BOARD=$2
fi
- x_ mkdir -p "bin/serprog_$1"
+ x_ xbmkdir "bin/serprog_$1"
x_ mv "$serx" "bin/serprog_$1/serprog_$2.${serx##*.}"
}
@@ -119,7 +119,7 @@ check_coreboot_util()
return 0
fi
- x_ mkdir -p "$utilelfdir"
+ x_ xbmkdir "$utilelfdir"
x_ cp "$utilsrcdir/$1" "$utilelfdir"
if [ "$1" = "cbfstool" ]; then
@@ -453,7 +453,7 @@ cprom()
printf "Creating new %s image: '%s'\n" "$projectname" "$newrom"
- x_ mkdir -p "bin/$target"
+ x_ xbmkdir "bin/$target"
x_ $cpcmd "$irom" "$newrom"
}