Created
March 4, 2015 02:27
-
-
Save busches/a0e90d8f18d064e2ecc0 to your computer and use it in GitHub Desktop.
CM Build Script
This file contains hidden or 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
#!/usr/bin/env bash | |
# colorization fix in Jenkins | |
export CL_RED="\"\033[31m\"" | |
export CL_GRN="\"\033[32m\"" | |
export CL_YLW="\"\033[33m\"" | |
export CL_BLU="\"\033[34m\"" | |
export CL_MAG="\"\033[35m\"" | |
export CL_CYN="\"\033[36m\"" | |
export CL_RST="\"\033[0m\"" | |
export OUT_DIR_COMMON_BASE=$(pwd) | |
echo $OUT_DIR_COMMON_BASE | |
# refresh local manifest | |
cd /media/Backup/cm/.repo/local_manifests | |
git reset --hard | |
git checkout master | |
cd /media/Backup/cm | |
export PATH=/home/scott/bin:$PATH | |
# repo sync | |
source build/envsetup.sh | |
reposync | |
# only build if repo sync finished | |
returnCode=$? | |
if [ $returnCode -ne 0 ]; then | |
echo "************************************************" | |
echo "Repo sync failed, falling back to repo sync -j1" | |
echo "************************************************" | |
repo sync -j1 | |
returnCode=$? | |
if [ $returnCode -ne 0 ]; then | |
echo "************************************************" | |
echo "Repo sync failed, exiting" | |
echo "************************************************" | |
exit $returnCode | |
fi | |
fi | |
# revert render | |
# cd /media/Backup/cm/kernel/lge/msm8974 | |
# git checkout b2c5a3536be890408afcda3ca291da67742e7186 | |
cd /media/Backup/cm | |
export USE_CCACHE=1 | |
# rm -f out/target/product/vs980/system/build.prop | |
make clean | |
time brunch vs980 2>&1 | tee cm-10-$(date -u +%Y%m%d_%T)-UNOFFICIAL-vs980.log | |
cp $OUT_DIR_COMMON_BASE/cm/target/product/vs980/*UNOFFICIAL* /var/lib/jenkins/jobs/Build_CM12/workspace/builds | |
source /home/scott/Scripts/changeLog.sh | |
ccache -s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment