Compare commits
No commits in common. "9a613e374ec8967a9101f1f7ffbf0a46e782334d" and "4efc74504f56c42c205c48aad0f8e6479bbd8175" have entirely different histories.
9a613e374e
...
4efc74504f
1 changed files with 2 additions and 10 deletions
12
patchport.py
12
patchport.py
|
@ -20,9 +20,6 @@ cutthecord_folder = os.path.dirname(os.path.realpath(__file__))
|
|||
debug = False
|
||||
tmp_folder = "/tmp/patchport"
|
||||
|
||||
if debug:
|
||||
print(f"ctc folder: {cutthecord_folder}")
|
||||
|
||||
|
||||
def modify_patch(patch_name, patch_path):
|
||||
with open(patch_path) as f:
|
||||
|
@ -92,7 +89,7 @@ re_versioncode_xml = re.compile(r'(platformBuildVersionCode="[0-9]+")')
|
|||
re_versionname_xml = re.compile(r'(platformBuildVersionName="[0-9a-z.]+")')
|
||||
|
||||
re_versioncode_yml = re.compile(r'versionCode: \'([0-9]+)\'')
|
||||
re_versionname_yml = re.compile(r'versionName: (.+)$')
|
||||
re_versionname_yml = re.compile(r'versionName: ([0-9a-z.]+)')
|
||||
|
||||
re_releasedate = re.compile(r'released on ([0-9]{4}-[0-9]{2}-[0-9]{2})')
|
||||
re_crashlytics = re.compile(r'com\.crashlytics\.android\.build_id">([a-z0-9]'
|
||||
|
@ -115,13 +112,8 @@ with open(os.path.join(apk_folder, "res", "values", "strings.xml")) as f:
|
|||
failures = []
|
||||
|
||||
for patch in os.listdir(os.path.join(cutthecord_folder, "patches")):
|
||||
if debug:
|
||||
print(f"going over patch: {patch}")
|
||||
|
||||
# Ignore non-dirs
|
||||
if not os.path.isdir(os.path.join(cutthecord_folder, "patches", patch)):
|
||||
if debug:
|
||||
print(f"patch is not a folder, skipping: {patch}")
|
||||
if not os.path.isdir(patch):
|
||||
continue
|
||||
|
||||
patch_path = os.path.join(cutthecord_folder, "patches", patch,
|
||||
|
|
Reference in a new issue