-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync
executable file
·53 lines (38 loc) · 2.72 KB
/
sync
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
#!/bin/bash
[email protected]:Hatsune71/Anci.git
BRANCH=test
ancient_dev=false
mkdir -p /tmp/rom
cd /tmp/rom
mkdir -p /home/ci/.ssh
echo "$RSA" > /home/ci/.ssh/id_rsa
sudo chmod 700 /home/ci/.ssh/id_rsa
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> /home/ci/.ssh/config
eval $(ssh-agent -s)
ssh-add /home/ci/.ssh/id_rsa
# Repo init command, that -device,-mips,-darwin,-notdefault part will save you more time and storage to sync, add more according to your rom and choice. Optimization is welcomed! Let's make it quit, and with depth=1 so that no unnecessary things.
repo init --no-repo-verify --depth=1 -u "$MANIFEST" -b "$BRANCH" -g default,-device,-mips,-darwin,-notdefault || repo init --no-repo-verify --depth=1 -u "$MANIFEST" -b "$BRANCH" -g default,-device,-mips,-darwin,-notdefault
git config --global user.name Hatsune71
git config --global user.email [email protected]
# Sync source with -q, no need unnecessary messages, you can remove -q if want! try with -j30 first, if fails, it will try again with -j8
repo sync -c --no-clone-bundle -q --no-tags --optimized-fetch --prune --force-sync -j$(nproc --all) || repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j8
# Sync stuffs
find hardware/qcom-caf/msm8996/display hardware/qcom-caf/msm8996/media hardware/qcom-caf/msm8998/audio vendor/codeaurora/telephony system/sepolicy -delete
git clone https://github.com/wave-project/vendor_codeaurora_telephony --depth=1 --single-branch vendor/codeaurora/telephony
git clone --single-branch https://github.com/Jabiyeff/android_hardware_qcom_media hardware/qcom-caf/msm8996/media
git clone --single-branch https://github.com/Jabiyeff/android_hardware_qcom_display hardware/qcom-caf/msm8996/display
git clone https://github.com/LineageOS/android_hardware_qcom_audio --depth=1 --single-branch -b lineage-18.1-caf-msm8996 hardware/qcom-caf/msm8996/audio
git clone https://github.com/Hatsune71/xiaomi_ysl.git --depth=1 device/xiaomi/ysl
git clone https://github.com/Hatsune71/vendor_ysl.git --depth=1 vendor/xiaomi/ysl
git clone https://github.com/stormbreaker-project/kernel_xiaomi_ysl.git --depth=1 -b eleven kernel/xiaomi/ysl
git clone [email protected]:Hatsune71/sepolicy.git --depth=1 system/sepolicy
if [ ancient_dev == true]
then
# Ancient Dev Preview
find packages/apps/Settings packages/apps/AncientSettings frameworks/base -delete
git clone [email protected]:Ancient-Roms/packages_apps_Settings.git -b xyz_beta4 packages/apps/Settings --depth=1
git clone [email protected]:Ancient-Roms/packages_apps_AncientSettings.git -b xyz_beta4 packages/apps/AncientSettings --depth=1
git clone [email protected]:Ancient-Roms/frameworks_base.git -b xyz_beta4 frameworks/base --depth=1
else
echo "Move to Build Section"
fi