From 8a22115c6defc3caa4924bd4db0109706c63715d Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Fri, 12 Apr 2013 07:43:53 -0700 Subject: [PATCH] Allow build dir to be changed from /tmp Adds an env var TMP_DIR which will override mktemp's default location. Fixes bug 1168432 Change-Id: I60c63389bb2a639f948e7e96bf9aaea0ea73e27d --- lib/common-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common-functions b/lib/common-functions index d300e347..8cb9c333 100644 --- a/lib/common-functions +++ b/lib/common-functions @@ -14,7 +14,7 @@ # under the License. function mk_build_dir () { - export TMP_BUILD_DIR=$(mktemp -t -d image.XXXXXXXX) + export TMP_BUILD_DIR=$(mktemp -t -d --tmpdir=${TMP_DIR:-/tmp} image.XXXXXXXX) [ $? -eq 0 ] || die "Failed to create tmp directory" trap cleanup EXIT echo Building in $TMP_BUILD_DIR