From a07786a257e96ad39e74a06c1024a5feeef32ce4 Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@stfc.ac.uk> Date: Wed, 19 Oct 2011 03:35:57 +0100 Subject: [PATCH] Add a script to pull in Third_Party on the Mac. Refs #3977 --- Code/fetch_Third_Party.sh | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 Code/fetch_Third_Party.sh diff --git a/Code/fetch_Third_Party.sh b/Code/fetch_Third_Party.sh new file mode 100755 index 00000000000..d36629410c0 --- /dev/null +++ b/Code/fetch_Third_Party.sh @@ -0,0 +1,46 @@ +#! /bin/bash +# This script deals with getting hold of the required third party includes and libraries +# It will either clone or pull 3rdpartyincludes & 3rdpartylibs-mac and put them in the right place for CMake + +gitcmd=`which git` +arch=mac + +if [ -z "${gitcmd}" ]; then + echo 'Unable to find git, check that it is installed and on the PATH' + exit 1 +fi + +function update { + # Just making sure what we have is up to date + echo Updating Third_Party includes and libraries... + cd Third_Party/include + ${gitcmd} pull + cd ../lib/${arch} + ${gitcmd} pull + # Be sure to end up back where we started + cd ../../.. + exit 0 +} + +function clone { + echo Cloning Third_Party includes and libraries... + # Find out the url where mantid came from so we use the same location & protocol + url=`git config --get remote.origin.url | sed -e 's@/mantid.git@@'` + echo "mantidproject URL set to ${url}" + incs=${url}/3rdpartyincludes.git + echo "URL for includes set to ${incs}" + libs=${url}/3rdpartylibs-mac.git + echo "URL for libraries set to ${libs}" + ${gitcmd} clone ${incs} Third_Party/include + ${gitcmd} clone ${libs} Third_Party/lib/mac64 + exit 0 +} + +# First check if everything is already there - if so we just want to update +if [ -d Third_Party/include ]; then + update +else + clone +fi + + -- GitLab