From 19ed213e0cf375e5d385df3615690e4948f1fe52 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 15 Jan 2023 02:28:15 +0530 Subject: [PATCH] Added optional support for a post install script --- README.md | 1 + build_revanced.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 7ba912d..82cd312 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Just run `./build_revanced (force/clean/experimental/checkon - The script will download the **automatically selected compatible version** (using compatibility of patches as listed [here](https://github.com/revanced/revanced-patches#list-of-available-patches)) of Youtube on APKMirror, **NOT** latest official version on Google Play. - Under **NO CIRCUMSTANCES** any APKs will be uploaded to this repository to avoid DMCA. - The script assumes that the working directory has the `telegram.sh` script along with a working config file and optionally `telegram-upload` installed and working with the channel link saved in a file called `channel_address`. For their config, look at the links provided on top. +- It can also run a post script (if exists) called `post_script.sh`. The `timestamp` would is passed as `$1`. - In the current configuration, the script only builds YouTube ReVanced and YouTube Music ReVanced (both nonroot), but it's easy to add support for any other ReVanced app. The code for root builds is included but commented out. - All the packages are pulled from [APKMirror](https://apkmirror.com) and GitHub (the `revanced/*` repos). diff --git a/build_revanced.sh b/build_revanced.sh index 86a096b..125d51c 100755 --- a/build_revanced.sh +++ b/build_revanced.sh @@ -227,4 +227,7 @@ find ./archive -maxdepth 1 -type f -printf '%Ts\t%P\n' \ | xargs -r -I {} rm "./archive/{}" find ./logs -mtime +7 -exec rm {} \; +# Run a custom post script, if available +[ -f post_script.sh ] && ./post_script.sh $timestamp + echo "Done!"$'\n'"************************************" \ No newline at end of file