-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* readme and build script clean up
- Loading branch information
Showing
2 changed files
with
34 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
install_dep(){ | ||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash | ||
sudo yum install -y git-lfs | ||
git lfs install | ||
sudo yum install -y java-1.8.0-openjdk-devel git cmake patch libtool automake yasm zlib-devel centos-release-scl | ||
sudo yum install -y devtoolset-7-gcc-* | ||
} | ||
echo "Installing dependencies" | ||
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 | ||
# export JAVA_PROXY="-Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=1234 -Dhttps.proxyHost=proxy.example.com -Dhttps.proxyPort=1234" | ||
# gcc --version | ||
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" | ||
|
||
echo "Clean and Build" | ||
./gradlew $JAVA_PROXY clean | ||
./gradlew $JAVA_PROXY build | ||
./gradlew $JAVA_PROXY build |