-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsync.sh
36 lines (31 loc) · 1.13 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
# Clone kernel source
if [[ "$*" =~ "stable" ]]; then
git clone --depth=1 $zacky/kernel.git -b asu kernel
cd kernel || exit
fi
# Clone toolchain
if [[ "$*" =~ "clang" ]]; then
git clone --depth=1 https://gitlab.com/Panchajanya1999/azure-clang clang
elif [[ "$*" =~ "gcc" ]]; then
git clone --depth=1 https://github.com/avinakefin/GCC-12-arm32 arm32
git clone --depth=1 https://github.com/avinakefin/GCC-12-aarch64 arm64
fi
# Clone anykernel3
git clone --depth=1 $zacky/anykernel.git -b lavender-dtb ak3-lavender
# Telegram setup
push_message() {
curl -s -X POST \
https://api.telegram.org/bot"{$BOT_TOKEN}"/sendMessage \
-d chat_id="${CHAT_ID}" \
-d text="$1" \
-d "parse_mode=html" \
-d "disable_web_page_preview=true"
}
# Push message to telegram
push_message "
<b>======================================</b>
<b>Start Building :</b> <code>MRT Kernel</code>
<b>Linux Version :</b> <code>$(make kernelversion | cut -d " " -f5 | tr -d '\n')</code>
<b>Source Branch :</b> <code>$(git rev-parse --abbrev-ref HEAD)</code>
<b>======================================</b> "