From 93991cfa134c1ae768b4777900760cf7f450db78 Mon Sep 17 00:00:00 2001 From: Oleg Korshul Date: Thu, 14 Jul 2016 18:05:14 +0300 Subject: [PATCH] fetch & build boost mac --- Common/3dParty/boost/fetch.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) mode change 100644 => 100755 Common/3dParty/boost/fetch.sh diff --git a/Common/3dParty/boost/fetch.sh b/Common/3dParty/boost/fetch.sh old mode 100644 new mode 100755 index cb4d53a900..19afefae46 --- a/Common/3dParty/boost/fetch.sh +++ b/Common/3dParty/boost/fetch.sh @@ -3,6 +3,25 @@ SCRIPT=$(readlink -f "$0") SCRIPTPATH=$(dirname "$SCRIPT") +os=$(uname -s) +platform="" + +case "$os" in + Linux*) platform="linux" ;; + Darwin*) platform="mac" ;; + *) exit ;; +esac + +if [[ "$platform" == *"mac"* ]] +then +if [[ -f "$SCRIPTPATH/7zX_1.7.1.dmg" ]] +then +echo "7z already downloaded" +else +wget http://static.updatestar.net/dl/7zX/7zX_1.7.1.dmg +fi +fi + if [[ -f "$SCRIPTPATH/boost_1_58_0.7z" ]] then echo "boost already downloaded" @@ -13,5 +32,12 @@ fi if [ -d "$SCRIPTPATH/boost" ]; then echo "boost already extracted" else +if [[ "$platform" == *"linux"* ]] +then 7z x "$SCRIPTPATH/boost_1_58_0.7z" -o"$SCRIPTPATH/" +else +hdiutil mount "$SCRIPTPATH/7zX_1.7.1.dmg" +/Volumes/7zX/7zX.app/Contents/Resources/7za x "$SCRIPTPATH/boost_1_58_0.7z" -o"$SCRIPTPATH/" +hdiutil unmount /Volumes/7zX +fi fi