diff --git a/lib/common-functions b/lib/common-functions index f80d5f42..22a2de11 100644 --- a/lib/common-functions +++ b/lib/common-functions @@ -24,8 +24,9 @@ function tmpfs_check() { } function mk_build_dir () { - export TMP_BUILD_DIR=$(mktemp -t -d --tmpdir=${TMP_DIR:-/tmp} image.XXXXXXXX) + TMP_BUILD_DIR=$(mktemp -t -d --tmpdir=${TMP_DIR:-/tmp} image.XXXXXXXX) [ $? -eq 0 ] || die "Failed to create tmp directory" + export TMP_BUILD_DIR if tmpfs_check ; then sudo mount -t tmpfs tmpfs $TMP_BUILD_DIR fi