summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-12-22 10:50:17 +0000
committerLeah Rowe <leah@libreboot.org>2023-12-22 10:50:17 +0000
commit2f98ca6dabace3569a0ae2ee0a33d901af6547b6 (patch)
treebff91e495e97e90007a12fabd3e01fc8db84ad42 /build
parentab65ea4c99af4f5569496c58b604ada612a2469a (diff)
build: simplified TMPDIR handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'build')
-rwxr-xr-xbuild9
1 files changed, 2 insertions, 7 deletions
diff --git a/build b/build
index 7a75a36a..551e9031 100755
--- a/build
+++ b/build
@@ -18,12 +18,7 @@ eval "$(setvars "" option aur_notice tmpdir)"
tmpdir_was_set="y"
set | grep TMPDIR 1>/dev/null 2>/dev/null || tmpdir_was_set="n"
if [ "${tmpdir_was_set}" = "y" ]; then
- tmpdir="${TMPDIR##*/}"
- tmpdir="${TMPDIR%_*}"
- if [ "${tmpdir}" = "lbmk" ]; then
- tmpdir=""
- tmpdir_was_set="n"
- fi
+ [ "${TMPDIR%_*}" = "/tmp/lbmk" ] || tmpdir_was_set="n"
fi
if [ "${tmpdir_was_set}" = "n" ]; then
export TMPDIR="/tmp"
@@ -31,8 +26,8 @@ if [ "${tmpdir_was_set}" = "n" ]; then
export TMPDIR="${tmpdir}"
else
export TMPDIR="${TMPDIR}"
+ tmpdir="${TMPDIR}"
fi
-tmpdir="${TMPDIR}"
linkpath="${0}"
linkname="${linkpath##*/}"