forked from akhilnarang/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrr.sh
More file actions
executable file
·67 lines (59 loc) · 3.77 KB
/
rr.sh
File metadata and controls
executable file
·67 lines (59 loc) · 3.77 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
#
# Copyright � 2015, Akhil Narang "akhilnarang" <akhilnarang.1999@gmail.com>
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Please maintain this if you use this script or any part of it
#
#!/bin/bash
home=/android/common/rr
export USE_CCACHE=1
export CCACHE_DIR=/android/.ccache
ccache -M 500G
echo "██████╗ ██╗ █████╗ ███████╗██╗███╗ ██╗ ██████╗ ██████╗ ██╗ ██╗ ██████╗ ███████╗███╗ ██╗██╗██╗ ██╗";
echo "██╔══██╗██║ ██╔══██╗╚══███╔╝██║████╗ ██║██╔════╝ ██╔══██╗██║ ██║██╔═══██╗██╔════╝████╗ ██║██║╚██╗██╔╝";
echo "██████╔╝██║ ███████║ ███╔╝ ██║██╔██╗ ██║██║ ███╗██████╔╝███████║██║ ██║█████╗ ██╔██╗ ██║██║ ╚███╔╝ ";
echo "██╔══██╗██║ ██╔══██║ ███╔╝ ██║██║╚██╗██║██║ ██║██╔═══╝ ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║██║ ██╔██╗ ";
echo "██████╔╝███████╗██║ ██║███████╗██║██║ ╚████║╚██████╔╝██║ ██║ ██║╚██████╔╝███████╗██║ ╚████║██║██╔╝ ██╗";
echo "╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝";
echo " ";
figlet ResurrectionRemix
cd $home
curl --create-dirs -L -o .repo/local_manifests/roomservice.xml -O -L https://raw.githubusercontent.com/anik1199/blazingphoenix/master/rr.xml
touch synclog;
echo -e "Fetched Local manifest\nSyncing now!";
repo sync -f --force-sync -j125 >> synclog 2>&1
repo sync -f --force-sync >> synclog 2>&1
echo -e "sync done";
echo -e "Setting up build environment";
. build/envsetup.sh
rm -rf bionic
git clone git://github.com/ResurrectionRemix/android_bionic -b sprout bionic
make -j10 clobber
for DEVICE in jfltexx jfltetmo
do
export UPLOAD_DIR=/var/www/html/downloads/ResurrectionRemix/$DEVICE
### Lunching device
echo -e "Lunching $DEVICE"
rm -rf device/samsung/$DEVICE/cm.dependencies
lunch cm_$DEVICE-userdebug
### Build and log output to a log file
echo -e "Starting ResurrectionRemix build of $DEVICE in 5 seconds"
sleep 5
export WITH_LZMA_OTA=true
export KBUILD_BUILD_HOST=resurrectionremix-lp
export LOCALVERSION="~BlazingPhoenix"
touch $DEVICE-log
export KBUILD_BUILD_USER=TJSteveMX;
make -j10 bacon >> $DEVICE-log 2>&1
bash /var/lib/jenkins/upload-scripts/esteban.sh $OUT/Resurrection*.zip
echo -e $DEVICE build done :D
cp -v out/target/product/$DEVICE/Resurrection*.zip $UPLOAD_DIR/
done