-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathzzboost.sh
executable file
·37 lines (30 loc) · 942 Bytes
/
zzboost.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
#!/bin/bash
# install boost
set -e
ROOTDIR=${ZZROOT:-$HOME/app}
NAME="boost"
TYPE=".tar.gz"
VERSION="1.76.0"
FILE="$NAME-$VERSION$TYPE"
DOWNLOADURL="https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz"
echo $NAME will be installed in "$ROOTDIR"
mkdir -p "$ROOTDIR/downloads"
cd "$ROOTDIR"
if [ -f "downloads/$FILE" ]; then
echo "downloads/$FILE exist"
else
echo "$FILE does not exist, downloading from $DOWNLOADURL"
wget $DOWNLOADURL -O $FILE
mv $FILE downloads/
fi
mkdir -p src/$NAME
tar xf downloads/$FILE -C src/$NAME --strip-components 1
# export CC=/mnt/lustre/lizz/app/bin/gcc
# export CXX=/mnt/lustre/lizz/app/bin/g++
# export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/mnt/lustre/lizz/anaconda3/include/python3.7m/"
cd src/$NAME
./bootstrap.sh --prefix="$ROOTDIR"
./b2 install
echo $NAME installed on "$ROOTDIR"
echo add following line to .zshrc
echo export BOOST_ROOT="$ROOTDIR"