-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync.sh
36 lines (31 loc) · 1.14 KB
/
sync.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
#!/usr/bin/env bash
# Source Configs
source $CONFIG
if ! [ -d "${KERNEL_DIR}" ]; then
msg "Clonning kernel source..."
if ! git clone --depth 1 ${KERNEL_SOURCE} -b ${KERNEL_BRANCH} ${MRT_DIR}/${DEVICE_CODENAME}; then
msg1 "Cloning failed! Aborting..."
exit 1
fi
fi
if ! [ -d "${CLANG_DIR}" ]; then
msg "Clonning toolchain clang..."
if ! git clone --depth 1 https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86 ${TC_DIR}; then
msg1 "Cloning failed! Aborting..."
exit 1
fi
fi
if ! [ -d "${GCC_64_DIR}" ]; then
msg "Clonning gcc toolchain arm64..."
if ! git clone --depth=1 -b lineage-19.1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9.git ${GCC_64_DIR}; then
msg1 "Cloning failed! Aborting..."
exit 1
fi
fi
if ! [ -d "${GCC_32_DIR}" ]; then
msg "Clonning gcc toolchain arm..."
if ! git clone --depth=1 -b lineage-19.1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.9.git ${GCC_32_DIR}; then
msg1 "Cloning failed! Aborting..."
exit 1
fi
fi