-
Notifications
You must be signed in to change notification settings - Fork 2
/
apply.sh
67 lines (58 loc) · 1.24 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
#!/bin/bash
set -e
PD=$(cd $(dirname $0);pwd)
apply_patch() {
patches="$(readlink -f -- $1)"
tree="$2"
for project in $(cd $patches/patches/$tree; echo *);do
p="$(tr _ / <<<$project |sed -e 's;platform/;;g')"
pushd $p
for patch in $patches/patches/$tree/$project/*.patch;do
git am $patch || exit
done
popd
done
}
DEVICE="Cezanne"
case $1 in
kosp | -k)
PROJECT="AOSP-Krypton"
;;
pe | -p)
PROJECT="Pixel-Experience"
;;
lineage | -l)
PROJECT="LineageOS-19.1"
;;
lineage-20 | -l-20)
PROJECT="LineageOS-20.0"
;;
acme | -ae)
PROJECT="AcmeUI"
;;
arrow | -aw)
PROJECT="ArrowOS"
;;
dotos | -d)
PROJECT="dotOS"
;;
pe13 | -pe)
PROJECT="Pixel-Experience-13.0"
;;
*)
sleep 0.5
echo "Unsupported project"
echo "Please check spelling"
exit
;;
esac
# GameSpace
if [ -d $PD/patches/$1/packages_apps_GameSpace ] && [ ! -d packages/apps/GameSpace ] ;then
git clone https://github.com/crdroidandroid/android_packages_apps_GameSpace -b 12.1 packages/apps/GameSpace
fi
echo "Adapt $PROJECT for $DEVICE"
echo "Executing in 5 seconds - CTRL-C to exit"
echo ""
sleep 5
echo "Applying patches"
apply_patch $PD $PROJECT