summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-02 03:39:10 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-02 03:39:10 +0100
commit7b02bb9aa6e533f30f25133caf9d214ca3d5bda2 (patch)
tree48c632f092a56050308a9478379311b66048c9d5 /script
parent8c03b886c4d4b9bcfb1cb30b3704b8af561c2f45 (diff)
do not handle errors on mktemp in shell scripts
errors are not defined for mktemp, and the /tmp file system should be assumed reliable. if /tmp is *unreliable*, then this is not something that lbmk either can or should fix; the user clearly has bigger problems. manpages for mktemp do not define errors. it is assumed to be completely reliable. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/build/boot/roms_helper6
-rwxr-xr-xscript/handle/make/config2
2 files changed, 3 insertions, 5 deletions
diff --git a/script/build/boot/roms_helper b/script/build/boot/roms_helper
index 2d185b7d..5685ef72 100755
--- a/script/build/boot/roms_helper
+++ b/script/build/boot/roms_helper
@@ -263,8 +263,7 @@ build_grub_roms()
-n background.png -t raw
fi
- tmpcfg=$(mktemp -t coreboot_rom.XXXXXXXXXX) ||
- err "build_grub_roms: cannot create temporary scan.cfg"
+ tmpcfg=$(mktemp -t coreboot_rom.XXXXXXXXXX)
x_ printf "set grub_scan_disk=\"%s\"\n" "${grub_scan_disk}" >"${tmpcfg}"
[ "${grub_scan_disk}" = "both" ] || \
x_ "${cbfstool}" "${tmprom}" add -f "${tmpcfg}" -n scan.cfg -t raw
@@ -302,8 +301,7 @@ mkGrubRom() {
keymapcfg="elf/grub/keymap_${_keymap}.cfg"
- tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX) || \
- err "mkGrubRom: cannot create tmprom"
+ tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX)
x_ cp "${_cbrom}" "${tmprom}"
x_ "${cbfstool}" "${tmprom}" add -f "${keymapcfg}" -n keymap.cfg -t raw
diff --git a/script/handle/make/config b/script/handle/make/config
index d7d11bf1..8795c3ba 100755
--- a/script/handle/make/config
+++ b/script/handle/make/config
@@ -18,7 +18,7 @@ export LOCALVERSION="-${projectname}-${our_version}"
eval "$(setvars "" arch cfgsdir codedir config config_name crossgcc_ada mode \
elfdir listfile project romtype target target_dir targets tree cbfstool)"
-tmpclean="$(mktemp -d -t makeclean.XXXXXXXXXX)" || fail "!mkdir tmpclean"
+tmpclean="$(mktemp -d -t makeclean.XXXXXXXXXX)"
main()
{