-
Notifications
You must be signed in to change notification settings - Fork 0
/
merge.sh
63 lines (57 loc) · 1.79 KB
/
merge.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
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
#!/usr/bin/env bash
#
# Copyright (C) 2021-2022 a xyzprjkt property
#
AOSP_TAG=android-14.0.0_r2
XD_VERSION=14.0.1
XD_BRANCH=fourteen
XD_BRANCH_NEW=fourteen
XD_REPO_LIST=(bootable_recovery
art
bionic
build
build_soong
libcore
external_e2fsprogs
external_gptfdisk
external_exfatprogs
external_mksh
external_selinux
external_tinycompress
external_sqlite
frameworks_av
frameworks_base
frameworks_native
hardware_libhardware
packages_apps_Nfc
packages_apps_ThemePicker
packages_apps_Settings
packages_apps_WallpaperPicker2
packages_modules_adb
packages_modules_Connectivity
system_update_engine
system_core
system_sepolicy
system_vold)
# Inlined function to post a message
export BOT_MSG_URL="https://api.telegram.org/bot$TG_TOKEN/sendMessage"
tg_post_msg() {
curl -s -X POST "$BOT_MSG_URL" -d chat_id="$TG_CHAT_ID" \
-d "disable_web_page_preview=true" \
-d "parse_mode=html" \
-d text="$1"
}
# Send Upstream Source Information
tg_post_msg "<b>xdroid Source Updater</b>%0A<b>xdroid Revision</b>: <code>${XD_VERSION}</code>%0A<b>AOSP Revision</b>: <code>${AOSP_TAG}</code>%0A<b>xdroid Version</b>: <code>${XD_VERSION}</code>"
for str in ${XD_REPO_LIST[@]}; do
git clone https://$GH_USERNAME:[email protected]/xdroid-oss/xd_${str} xd_${str}
cd xd_${str}
# git remote add aosp https://android.googlesource.com/platform/${str//_//}
# git fetch aosp ${AOSP_TAG} && git merge FETCH_HEAD
# git push origin ${XD_BRANCH}
git checkout -b ${XD_BRANCH_NEW}
git push origin -f ${XD_BRANCH_NEW}
tg_post_msg "<b>xdroid Source Updater</b>%0A<code>${str} was pushed in ${XD_BRANCH_NEW}</code>"
cd ../
done
tg_post_msg "<b>xdroid Source Updater</b>%0A<code>Source successfull upstreamed</code>"