From 759f9820901cce5155b687597cca0ec2e4700ed6 Mon Sep 17 00:00:00 2001
From: Martyn Gigg <martyn.gigg@stfc.ac.uk>
Date: Sun, 15 Feb 2015 18:27:38 +0000
Subject: [PATCH] Move default external data location to HOME

Refs #10870
---
 Code/Mantid/Build/Jenkins/buildscript     | 6 +++---
 Code/Mantid/Build/Jenkins/buildscript.bat | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Code/Mantid/Build/Jenkins/buildscript b/Code/Mantid/Build/Jenkins/buildscript
index 6a4ffd90309..fe0dd370e91 100755
--- a/Code/Mantid/Build/Jenkins/buildscript
+++ b/Code/Mantid/Build/Jenkins/buildscript
@@ -58,11 +58,11 @@ fi
 ###############################################################################
 # Set up the location for the local object store outside of the build and
 # source tree, which can be shared by multiple builds.
-# It defaults to the parent directory of the workspace but can be overridden
-# by setting the MANTID_DATA_STORE environment variable.
+# It defaults to a MantidExternalData directory within the HOME directory.
+# It can be overridden by setting the MANTID_DATA_STORE environment variable.
 ###############################################################################
 if [ -z "$MANTID_DATA_STORE" ]; then
-  export MANTID_DATA_STORE=$(dirname $WORKSPACE)
+  export MANTID_DATA_STORE=$HOME/MantidExternalData
 fi
 
 ###############################################################################
diff --git a/Code/Mantid/Build/Jenkins/buildscript.bat b/Code/Mantid/Build/Jenkins/buildscript.bat
index b260bb12865..766b7efbb12 100755
--- a/Code/Mantid/Build/Jenkins/buildscript.bat
+++ b/Code/Mantid/Build/Jenkins/buildscript.bat
@@ -22,11 +22,12 @@ set PATH=%WORKSPACE%\Code\Third_Party\lib\win64;%WORKSPACE%\Code\Third_Party\lib
 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 :: Set up the location for local object store outside of the build and source
 :: tree, which can be shared by multiple builds.
-:: It defaults to the parent directory of the workspace but can be overridden
-:: by setting the MANTID_DATA_STORE environment variable.
+:: It defaults to a MantidExternalData directory within the USERPROFILE
+:: directory. It can be overridden by setting the MANTID_DATA_STORE environment
+:: variable.
 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 if NOT DEFINED MANTID_DATA_STORE (
-  for %%F in ("%WORKSPACE%") do set MANTID_DATA_STORE=%%~dpF
+  set MANTID_DATA_STORE=%USERPROFILE%\MantidExternalData
 )
 
 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-- 
GitLab