forked from Haydar011/cirrus-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsync
25 lines (16 loc) · 903 Bytes
/
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
#!/bin/bash
mkdir -p /tmp/rom # Where to sync source
cd /tmp/rom
. /tmp/ci/function
SECONDS=0
# Sync source
repo init --depth=1 --no-repo-verify -u https://github.com/Havoc-OS/android_manifest.git -b eleven -g default,-mips,-darwin,-notdefault
# local manifest
git clone https://github.com/Headache01/local_manifest.git --depth 1 -b havoc-11 .repo/local_manifests
# Sync source without unnecessary messages, try with -j30 first, if fails, it will try again
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j$(nproc --all) || repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j$(nproc --all)
tg "$rom_name source sync completed!
Total Size: $(du -sh /tmp/rom | cut -d - -f 1 | cut -d / -f 1)
Time Took: $(($SECONDS / 60)) minute(s) and $(($SECONDS % 60)) second(s).
Status: $progress"
echo "$(($SECONDS / 60))" > /tmp/sync_time.txt