forked from IntelLabs/GKL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·35 lines (28 loc) · 985 Bytes
/
build.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
#!/usr/bin/env bash
install_dep(){
if ! rpm -qa | grep git-lfs; then
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
sudo yum install -y git-lfs
git lfs install
fi
pkg_list=( java-1.8.0-openjdk-devel git cmake patch libtool automake yasm zlib-devel centos-release-scl devtoolset-7-gcc-c++ )
for pkg in ${pkg_list[*]}; do
if ! rpm -qa | grep ${pkg}; then
sudo yum install -y $pkg
fi
done;
}
echo "Checking dependencies"
install_dep
echo "Setting GCC"
source scl_source enable devtoolset-7
gcc --version
echo "Setting proxy"
PROXY_HOST=`echo $https_proxy | tr -s '/' ':' | cut -d ':' -f2`
PROXY_PORT=`echo $https_proxy | tr -s '/' ':' | cut -d ':' -f3`
export JAVA_PROXY="-Dhttps.proxyHost=$PROXY_HOST -Dhttps.proxyPort=$PROXY_PORT"
git submodule init
git submodule update
echo "Clean and Build"
./gradlew $JAVA_PROXY clean
./gradlew $JAVA_PROXY build