diff --git a/ctcci/ctcci.py b/ctcci/ctcci.py index 35e231a..0162f90 100644 --- a/ctcci/ctcci.py +++ b/ctcci/ctcci.py @@ -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,12 +214,12 @@ 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}", - shell=True, - cwd=WORK_APK_PATH) + 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) # Pack the APK subprocess.run(f"{APKTOOL_BIN} b discord", diff --git a/patches/notrack/968.sh b/patches/notrack/968-post.sh similarity index 100% rename from patches/notrack/968.sh rename to patches/notrack/968-post.sh