forked from techyminati/python_codes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pbrp.py
34 lines (33 loc) · 1.35 KB
/
pbrp.py
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
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
# (c) eun0115 ( eun ) <[email protected]>
import os
import sys
os.makedirs('pbrp')
os.system('sudo apt update')
os.system('sudo apt upgrade')
os.system('git clone https://github.com/akhilnarang/scripts')
os.chdir('scripts')
os.system('bash setup/android_build_env.sh')
os.chdir('../pbrp')
import time
print ("==========================================================")
print (" Welcome to PitchBlackRecoveryProject Sync Script ")
print ("==========================================================")
time.sleep(3)
import time
print ("==========================================================")
print (" Do you want to sync the Source? ")
print ("==========================================================")
time.sleep(1)
n=input("Press Y to Continue, N to Exit: ")
if (n=="Y") or (n=="y") :
print("Starting Sync..")
print(" Warning: Repo is needed to be installed in prior of running this script")
os.system('repo init -u git://github.com/PitchBlackRecoveryProject/manifest_pb -b android-11.0')
print ("Starting Repo Sync")
os.system('repo sync -c --force-sync --optimized-fetch --no-tags --no-clone-bundle --prune -j$(nproc --all)')
else :
import time
time.sleep(3)
print("Re-run the script again to start sync incase you mistakenly pressed 'N' ")