-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: MD Raza <[email protected]>
- Loading branch information
1 parent
87db93f
commit 0820e39
Showing
2 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import os | ||
|
||
infinity = [ | ||
{ | ||
"local_path": "device_motorola_sm6225-common", | ||
"remote_url": "https://github.com/Infinity-X-Devices/device_motorola_sm6225-common", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_sm6225-common", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "kernel_motorola_sm6225", | ||
"remote_url": "https://github.com/Infinity-X-Devices/kernel_motorola_sm6225", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/moto-guamp/android_kernel_motorola_sm6225", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "device_motorola_guamp", | ||
"remote_url": "https://github.com/Infinity-X-Devices/device_motorola_guamp", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_guamp", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "device_motorola_guam", | ||
"remote_url": "https://github.com/Infinity-X-Devices/device_motorola_guam", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_guam", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "device_motorola_borneo", | ||
"remote_url": "https://github.com/Infinity-X-Devices/device_motorola_borneo", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_borneo", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "device_motorola_devon", | ||
"remote_url": "https://github.com/Infinity-X-Devices/device_motorola_devon", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_devon", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "device_motorola_hawao", | ||
"remote_url": "https://github.com/Infinity-X-Devices/device_motorola_hawao", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_hawao", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "device_motorola_rhode", | ||
"remote_url": "https://github.com/Infinity-X-Devices/device_motorola_rhode", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_rhode", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "device_motorola_cebu", | ||
"remote_url": "https://github.com/Infinity-X-Devices/device_motorola_cebu", | ||
"remote_branch": "14", | ||
"upstream_url": "https://github.com/RazaDroidProject/android_device_motorola_cebu", | ||
"upstream_branch": "lineage-21" | ||
} | ||
] | ||
|
||
# Cloning repositories, rebasing and pushing | ||
for repo in infinity: | ||
if os.path.exists(repo["local_path"]): | ||
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']}") | ||
else: | ||
os.system(f"git clone {repo['remote_url']} -b {repo['remote_branch']} {repo['local_path']}") | ||
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import os | ||
|
||
pixelos = [ | ||
{ | ||
"local_path": "device_motorola_sm6225-common", | ||
"remote_url": "https://github.com/PixelOS-Devices/device_motorola_sm6225-common", | ||
"remote_branch": "fourteen", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_sm6225-common", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "vendor_motorola_sm6225-common", | ||
"remote_url": "https://github.com/PixelOS-Devices/vendor_motorola_sm6225-common", | ||
"remote_branch": "fourteen", | ||
"upstream_url": "https://github.com/TheMuppets/proprietary_vendor_motorola_sm6225-common", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "kernel_motorola_sm6225", | ||
"remote_url": "https://github.com/PixelOS-Devices/kernel_motorola_sm6225", | ||
"remote_branch": "fourteen", | ||
"upstream_url": "https://github.com/LineageOS/android_kernel_motorola_sm6225", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "device_motorola_guamp", | ||
"remote_url": "https://github.com/PixelOS-Devices/device_motorola_guamp", | ||
"remote_branch": "fourteen", | ||
"upstream_url": "https://github.com/LineageOS/android_device_motorola_guamp", | ||
"upstream_branch": "lineage-21" | ||
}, | ||
{ | ||
"local_path": "vendor_motorola_guamp", | ||
"remote_url": "https://github.com/PixelOS-Devices/vendor_motorola_guamp", | ||
"remote_branch": "fourteen", | ||
"upstream_url": "https://github.com/TheMuppets/proprietary_vendor_motorola_guamp", | ||
"upstream_branch": "lineage-21" | ||
} | ||
] | ||
|
||
# Cloning repositories, rebasing and pushing | ||
for repo in pixelos: | ||
if os.path.exists(repo["local_path"]): | ||
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']}") | ||
else: | ||
os.system(f"git clone {repo['remote_url']} -b {repo['remote_branch']} {repo['local_path']}") | ||
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']}") |