forked from trizet/android_device_lenovo_P70
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatches.sh
executable file
·45 lines (37 loc) · 1.08 KB
/
patches.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
#!/bin/bash
cd `dirname $0`
DSTDIR=$1
if [ -z "$DSTDIR" ]
then
echo "Используйте: $0 <папка с исходниками>"
fi
red=$(tput setaf 1) # Red
grn=$(tput setaf 2) # Green
txtrst=$(tput sgr0) # Reset
if
echo "${grn}'frameworks_base.patch'${txtrst}"
cat patches/frameworks_base.patch | patch -d $DSTDIR/frameworks/base/ -p1 -N -r -
cp -R patches/res $DSTDIR/frameworks/base/packages/SystemUI
then
echo "${grn}Применён успешно!${txtrst}"
else
echo "${red}Не применён!${txtrst}"
fi
if
echo "${grn}'packages_apps_Settings.patch'${txtrst}"
cat patches/packages_apps_Settings.patch | patch -d $DSTDIR/packages/apps/Settings/ -p1 -N -r -
then
echo "${grn}Применён успешно!${txtrst}"
else
echo "${red}Не применён!${txtrst}"
fi
if
echo "${grn}'packages_apps_CMUpdater.patch'${txtrst}"
cat patches/packages_apps_CMUpdater.patch | patch -d $DSTDIR/packages/apps/CMUpdater/ -p1 -N -r -
then
echo "${grn}Применён успешно!${txtrst}"
else
echo "${red}Не применён!${txtrst}"
fi
cd $DSTDIR
#git diff > x.patch