From 4885c7962d493087ab916e59040b134b8d2fabf7 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 2 Sep 2023 10:22:39 +0100 Subject: handle TMPDIR from include/export.sh it looks a bit cluttered just sitting there in the main script. make it an include. Signed-off-by: Leah Rowe --- lbmk | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'lbmk') diff --git a/lbmk b/lbmk index 175cf394..285e109f 100755 --- a/lbmk +++ b/lbmk @@ -25,26 +25,7 @@ set -u -e . "include/err.sh" - -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 -fi -if [ "${tmpdir_was_set}" = "n" ]; then - export TMPDIR="/tmp" - tmpdir="$(mktemp -d -t lbmk_XXXXXXXX)" - export TMPDIR="${tmpdir}" -else - export TMPDIR="${TMPDIR}" -fi -tmpdir="${TMPDIR}" +. "include/export.sh" projectname="$(cat projectname)" buildpath="" -- cgit v1.2.1