Merge "Ensure $TMP_BUILD_DIR is actually created."

This commit is contained in:
Jenkins 2013-08-01 00:41:52 +00:00 committed by Gerrit Code Review
commit 4284936084

View File

@ -24,8 +24,9 @@ function tmpfs_check() {
} }
function mk_build_dir () { 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" [ $? -eq 0 ] || die "Failed to create tmp directory"
export TMP_BUILD_DIR
if tmpfs_check ; then if tmpfs_check ; then
sudo mount -t tmpfs tmpfs $TMP_BUILD_DIR sudo mount -t tmpfs tmpfs $TMP_BUILD_DIR
fi fi