-
Notifications
You must be signed in to change notification settings - Fork 1
/
apply.sh
executable file
·68 lines (57 loc) · 1.3 KB
/
apply.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
unset SUCCESS
on_exit() {
if [ -z "$SUCCESS" ]; then
echo "ERROR: $0 failed. Please fix the above error."
exit 1
else
echo "SUCCESS: $0 has completed."
exit 0
fi
}
trap on_exit EXIT
http_patch() {
PATCHNAME=$(basename $1)
curl -L -o $PATCHNAME -O -L $1
cat $PATCHNAME |patch -p1
rm $PATCHNAME
}
# Change directory verbose
cdv() {
echo
echo "*****************************"
echo "Current Directory: $1"
echo "*****************************"
cd $BASEDIR/$1
}
# Change back to base directory
cdb() {
cd $BASEDIR
}
# Sanity check
if [ -d ../.repo ]; then
cd ..
fi
if [ ! -d .repo ]; then
echo "ERROR: Must run this script from the base of the repo."
SUCCESS=true
exit 255
fi
# Save Base Directory
BASEDIR=$(pwd)
# Abandon auto topic branch
set -e
. build/envsetup.sh
################ Apply Patches Below ####################
#repo start auto frameworks/base
#echo "Add signal strength mod"
#cdv frameworks/base
#git reset --hard
#http_patch https://dl.dropboxusercontent.com/u/13144052/CM11/hrubak/0001-SIGNAL-STRENGTH-MOD.patch
#http_patch https://dl.dropboxusercontent.com/u/13144052/CM11/hrubak/0001-Make-the-signalbars-show-when-not-connected-or-conne.patch
#cdb
repopick -b 76738
repopick -b 77856 78857 78014 78017 78023
##### SUCCESS ####
SUCCESS=true
exit 0