-
Notifications
You must be signed in to change notification settings - Fork 1
/
postBuild
29 lines (26 loc) · 955 Bytes
/
postBuild
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
#!/bin/bash
set -ex
#set up conda environment not needed
#change directory to the external folder
cd external
#check whether the folder DGGRID exists or not, if exist, delete it
if [ -d "DGGRID" ]; then
rm -rf DGGRID
fi
#clone a git repo to the external folder
sDggrid_url='https://github.com/sahrk/DGGRID.git'
git clone $sDggrid_url
#change directory to the DGGRID folder
cd DGGRID # enter the cloned repo
mkdir build # Make a directory to compile into
cd build # Switch into build directory
cmake -DCMAKE_BUILD_TYPE=Release .. # Prepare to compile
make # Build code.
#make install # Optionally install on your machine
# Copy the dggrid binary to /home/jovyan/.
cp src/apps/dggrid/dggrid /home/jovyan/
sFolder_bin=src/apps/dggrid
cd $sFolder_bin
./dggrid -v
./dggrid -h
echo "dggrid model is compiled successfully!"