forked from syphyr/cm_build_scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
repo_sync_cm14
executable file
·80 lines (67 loc) · 1.74 KB
/
repo_sync_cm14
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
74
75
76
77
78
79
80
#!/bin/bash
# Path to root of CM project directory
CM_PROJECT_DIR=~/workspace/CM14.1-Nightly
CM_DEVICE=~/workspace/CM14.1-Nightly/device/samsung/jfltexx
CM_KERNEL=~/workspace/CM14.1-Nightly/kernel/samsung/jf
CM_VENDOR=~/workspace/CM14.1-Nightly/vendor/samsung
CM_QCOM=~/workspace/CM14.1-Nightly/vendor/qcom/binaries
CM_TWRP=~/workspace/CM14.1-Nightly/bootable/recovery-twrp
CM_BUSYBOX=~/workspace/CM14.1-Nightly/external/busybox
## End Edit
cd "$CM_PROJECT_DIR"
if [ -e "../../patches/build.name.cm14.diff" ]; then
patch -R -p1 --no-backup-if-mismatch < ../../patches/build.name.cm14.diff
fi
repo sync --no-clone-bundle
#repo sync --force-sync --no-clone-bundle -c
if [ -e "../../patches/build.name.cm14.diff" ]; then
echo "Setting build name to NIGHTLY"
patch -p1 --no-backup-if-mismatch < ../../patches/build.name.cm14.diff
fi
echo ""
if [ -d "$CM_DEVICE" ]; then
cd "$CM_DEVICE"
echo "Rebasing device repo."
git checkout cm-14.1
git fetch github
git rebase github/cm-14.1
echo ""
fi
if [ -d "$CM_KERNEL" ]; then
cd "$CM_KERNEL"
echo "Rebasing kernel repo."
git checkout cm-14.1
git fetch github
git rebase github/cm-14.1
echo ""
fi
if [ -d "$CM_VENDOR" ]; then
cd "$CM_VENDOR"
echo "Rebasing vendor repo."
git checkout cm-14.1
git fetch github
git rebase github/cm-14.1
echo ""
fi
if [ -d "$CM_QCOM" ]; then
cd "$CM_QCOM"
echo "Rebasing qcom repo."
git checkout cm-14.1
git fetch github
git rebase github/cm-14.1
echo ""
fi
if [ -d "$CM_TWRP" ]; then
cd "$CM_TWRP"
echo "Update twrp repo."
git checkout android-7.1
git fetch github
git rebase github/android-7.1
fi
if [ -d "$CM_BUSYBOX" ]; then
cd "$CM_BUSYBOX"
git checkout cm-14.1
git fetch github
git rebase github/cm-14.1
echo ""
fi