From d285c6be536156c01c5c22a6c23cdaa1156b2713 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Mon, 8 Oct 2018 13:13:24 +0100
Subject: [PATCH] Give temporary build directory a unique ID to allow for
 parallelism

---
 src/freedombone-image | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/freedombone-image b/src/freedombone-image
index a41da2b6f..d5166473b 100755
--- a/src/freedombone-image
+++ b/src/freedombone-image
@@ -63,7 +63,8 @@ GENERIC_IMAGE_PASSWORD='freedombone'
 IMAGE_TYPE='beagleboneblack'
 CURR_DIR=$(pwd)
 CURR_USER="$USER"
-TEMPBUILD_DIR=~/.tmp_${PROJECT_NAME}_build
+UNIQUE_ID=$(openssl rand -base64 32 | tr -dc A-Za-z0-9 | head -c 10 ; echo -n '')
+TEMPBUILD_DIR=~/.tmp_${PROJECT_NAME}_build_${UNIQUE_ID}
 VMDEBOOTSTRAP_REPO=git://git.liw.fi/vmdebootstrap
 VMDEBOOTSTRAP_VERSION=0.8
 MAKEFILE=${PROJECT_NAME}-image-makefile
-- 
GitLab