forked from distok/cutthecord
ctcci: Instead of having one pre/post script, allow for separate pre-post scripts
uwu
This commit is contained in:
parent
08986e926c
commit
77a2e8ae2f
2 changed files with 13 additions and 6 deletions
|
@ -82,6 +82,13 @@ shutil.copytree(BASE_APK_PATH, WORK_APK_PATH)
|
|||
|
||||
# Go through patches and apply every single one of them
|
||||
for patch_name in PATCHES:
|
||||
pre_script = os.path.join(REPO_FOLDER, "patches",
|
||||
patch_name, f"{VERSION}-pre.sh")
|
||||
if os.path.exists(pre_script):
|
||||
subprocess.run(f"bash {pre_script}",
|
||||
shell=True,
|
||||
cwd=WORK_APK_PATH)
|
||||
|
||||
# Apply custom emoji patches
|
||||
if patch_name in ["mutant", "blobs"]:
|
||||
print(f"Applying {patch_name} emoji patch")
|
||||
|
@ -207,10 +214,10 @@ for patch_name in PATCHES:
|
|||
else:
|
||||
patch(patch_file, WORK_APK_PATH, patch_name)
|
||||
|
||||
patch_script = os.path.join(REPO_FOLDER, "patches",
|
||||
patch_name, f"{VERSION}.sh")
|
||||
if os.path.exists(patch_script):
|
||||
subprocess.run(f"bash {patch_script}",
|
||||
post_script = os.path.join(REPO_FOLDER, "patches",
|
||||
patch_name, f"{VERSION}-post.sh")
|
||||
if os.path.exists(post_script):
|
||||
subprocess.run(f"bash {post_script}",
|
||||
shell=True,
|
||||
cwd=WORK_APK_PATH)
|
||||
|
||||
|
|
Loading…
Reference in a new issue