-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathjob.sh
More file actions
41 lines (37 loc) · 757 Bytes
/
job.sh
File metadata and controls
41 lines (37 loc) · 757 Bytes
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
# CHECK DEVICE NAME
if [ -z "$GERRIT_PROJECT" ]
then
ZIPDEVICE=$(echo $LUNCH | sed s#cm_##g | sed s#-userdebug##g | sed s#-eng##g)
if [ -z "$ZIPDEVICE" ]
then
echo "EMPTY DEVICE"
exit 1
fi
export ZIPDEVICE=$ZIPDEVICE
fi
# HOME
if [ -z "$HOME" ]
then
echo HOME not in environment, guessing...
export HOME=$(awk -F: -v v="$USER" '{if ($1==v) print $6}' /etc/passwd)
fi
# WORKSPACE
cd $WORKSPACE
mkdir -p ../android
cd ../android
export OLDWORKSPACE=$WORKSPACE
export WORKSPACE=$PWD
export
#HUDSON
if [ ! -d hudson ]
then
git clone git://github.com/androidarmv6/hudson.git -b master
fi
cd hudson
## Get rid of possible local changes
git reset --hard
git pull -s resolve
cd ..
# BUILD
cp -fr hudson/build.sh build.sh
exec ./build.sh