forked from avary/android-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cm7Jenkins.sh
executable file
·48 lines (33 loc) · 1.05 KB
/
cm7Jenkins.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
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
export manufacturer=$1
export device=$2
export BUILD_NO=$BUILD_NUMBER
unset BUILD_NUMBER
WORKDIR=$WORKSPACE
OUTPUT=$WORKDIR
SOURCE=$WORKDIR/source
date1=`date +%Y%m%d`
date2=`date +%m%d%Y`
date3=`date +%m-%d-%Y`
numProcs=$(( `cat /proc/cpuinfo | grep processor | wc -l` + 1 ))
cd $SOURCE
export CYANOGEN_NIGHTLY=1
export USE_CCACHE=1
if [[ ${device} = "leo" ]] ; then
sed -i s/developerid=cyanogenmodnightly/developerid=cyanogenmodleonightly/g vendor/cyanogen/products/common.mk
# To make it for only cLK
sed -i 's/\(^TARGET_CUSTOM_RELEASETOOL.*\)/#\1/g' device/htc/${device}/BoardConfig.mk
fi
cp ./vendor/cyanogen/products/cyanogen_${device}.mk buildspec.mk
echo "Getting ROMManager"
./vendor/cyanogen/get-rommanager
echo -n "setting up environment ... "
. build/envsetup.sh > /dev/null 2>&1
echo -n "running brunch ... "
lunch cyanogen_${device}-eng
make -j ${numProcs} bootimage
make -j ${numProcs} bacon
mkdir -p $OUTPUT
cp out/target/product/${device}/updates*.zip* $OUTPUT/update-cm7-${device}-${BUILD_ID}.zip
cd $WORKSPACE
rm -rf $SOURCE