-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcm9
More file actions
executable file
·73 lines (60 loc) · 1.86 KB
/
cm9
File metadata and controls
executable file
·73 lines (60 loc) · 1.86 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
#
#****************************************************************
## Start timer:
START=$(date +%s)
#****************************************************************
## Check for missing parameters:
if [ "$1" != "s" ] && [ "$1" != "p4w" ] && [ "$1" != "p4" ]
then
echo "No target device defined"
exit 0
fi
#****************************************************************
## Set target:
if [ "$1" = "s" ]
then
trgt=galaxysmtd
fi
if [ "$1" = "p4w" ]
then
trgt=p4wifi
fi
if [ "$1" = "p4" ]
then
trgt=p4
fi
#****************************************************************
## Set basic folder parameters:
echo "Setting folders"
finalout=~/android/cm9/out/target/product/$trgt
androidtop=~/android/cm9
secsign=~/android/cm9/build/target/product/security
#****************************************************************
## Start the build:
echo "A CM9 ROM will be build for $trgt"
#****************************************************************
## Clean environment:
cd $androidtop
make installclean
rm $finalout/system/build.prop
rm $finalout/obj/PACKAGING/target_files_intermediates/cm_`echo $trgt`-target_files-eng.kasper.zip
rm $finalout/obj/PACKAGING/target_files_intermediates/cm_`echo $trgt`-target_files-eng.kasper/SYSTEM/build.prop
#****************************************************************
## Make the build:
cd $androidtop/
. build/envsetup.sh
brunch `echo $trgt`
#****************************************************************
## Copy the build:
echo "Copying fininalized build to AndroidFlash directory"
mv $finalout/MackayROM*.zip ~/AndroidFlash/$trgt/
#****************************************************************
## Report timer:
END=$(date +%s)
ELAPSED=$((END - START))
E_MIN=$((ELAPSED / 60))
E_SEC=$((ELAPSED - E_MIN * 60))
printf "${txtgrn}Elapsed: "
[ $E_MIN != 0 ] && printf "%d min(s) " $E_MIN
printf "%d sec(s)\n ${txtrst}" $E_SEC