-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildESP.sh
executable file
·59 lines (48 loc) · 1.7 KB
/
buildESP.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# this file should be sourced, not executed
# Ex, should be run by:
# source buildESP.sh
# ==========================================================
if ! command -v serveCSM &> /dev/null; then
# ==========================================================
currentPWD=$(pwd)
homeDir=$HOME
rm -rf ESP
mkdir ESP
cd $currentPWD/ESP
brew upgrade gcc
unset PYTHONINC
curl -O https://acdl.mit.edu/ESP/ESP.tgz -o ESP.tgz
tar -xf $currentPWD/ESP/ESP.tgz
# may need to change these lines to accomodate correct processor
curl -O https://acdl.mit.edu/ESP/OCC770-macos-arm64.tgz -o OCC770-macos-arm64.tgz
tar -xf $currentPWD/ESP/OCC770-macos-arm64.tgz
cd $currentPWD/ESP/EngSketchPad/config
./makeEnv $currentPWD/ESP/OpenCASCADE-7.7.0
cd $currentPWD/ESP/EngSketchPad
source ESPenv.sh
cd $currentPWD/ESP/EngSketchPad/src
make
cd $homeDir
temp_file=$(mktemp)
cat << EOF > $temp_file
# ==========================================================
# Added by Ada when building ESP
# Must come before any python path settings to ensure the
# correct version of python is called
# ==========================================================
source $currentPWD/ESP/EngSketchPad/ESPenv.sh
serveCSM='$currentPWD/ESP/EngSketchPad/bin/serveCSM'
export PATH='$currentPWD/ESP/EngSketchPad/bin:\$PATH'
# ==========================================================
EOF
cat .zshenv >> $temp_file
mv $temp_file .zshenv
cd $currentPWD
# ==========================================================
else
# ==========================================================
echo "serveCSM was detected, assuming that ESP is already installed"
return
# ==========================================================
fi
# ==========================================================