build: don't rm TMPDIR if it's /tmp

we override TMPDIR, setting it to /tmp/xbmk*C

if it's just set to tmp, that means we didn't set it properly,
which is a bug.

this patch protects against deletion of /tmp under such a
fault condition, if it were ever to occur in the future.

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2
Leah Rowe 2024-06-27 03:20:18 +01:00 committed by Leah Rowe
parent 6daea94df8
commit 32e1b13416
1 changed files with 1 additions and 1 deletions

2
build
View File

@ -127,7 +127,7 @@ fail()
tmp_cleanup()
{
[ "$xbmk_parent" = "y" ] || return 0
rm -Rf "$TMPDIR" || return 1
[ "$TMPDIR" = "/tmp" ] || rm -Rf "$TMPDIR" || return 1
rm -f lock || return 1
}