forked from oneinstack/oneinstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boost.sh
30 lines (29 loc) · 968 Bytes
/
boost.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
#!/bin/bash
# Author: Alpha Eva <kaneawk AT gmail.com>
#
# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
#
# Project home page:
# https://oneinstack.com
# https://github.com/lj2007331/oneinstack
installBoost() {
pushd ${oneinstack_dir}/src
if [ ! -e "/usr/local/lib/libboost_system.so" ]; then
boostVersion2=$(echo ${boost_version} | awk -F. '{print $1}')_$(echo ${boost_version} | awk -F. '{print $2}')_$(echo ${boost_version} | awk -F. '{print $3}')
tar xvf boost_${boostVersion2}.tar.gz
pushd boost_${boostVersion2}
./bootstrap.sh
./bjam --prefix=/usr/local
./b2 install
popd
fi
if [ -e "/usr/local/lib/libboost_system.so" ]; then
echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf
ldconfig
echo "${CSUCCESS}Boost installed successfully! ${CEND}"
rm -rf boost_${boostVersion2}
else
echo "${CFAILURE}Boost installed failed, Please contact the author! ${CEND}"
fi
popd
}