Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #619 from GyDavid22/main
Browse files Browse the repository at this point in the history
New options to delete cache after running the builder
  • Loading branch information
shrihankp authored Dec 20, 2022
2 parents c4fc190 + faeedbd commit 4ca8390
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions android-interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ Commands:
--delete-cache-no-keystore
--dcnk Deletes revanced/ before running builder, but
preserving keystore file.
--delete-cache-after
--dca Deletes revanced/ after running builder.
--delete-cache-after-no-keystore
--dcank Deletes revanced/ after running builder, but
preserving keystore file.
reinstall Delete everything and start from scratch.
--delete-keystore Delete the signature file also. This will
Expand Down Expand Up @@ -114,19 +119,33 @@ run_builder() {
preflight
echo
if [[ $1 == "--delete-cache" || $1 == "--dc" ]]; then
# Is this even called a cache?
log "Deleting builder cache..."
rm -rf $RVB_DIR/revanced
delete_cache
fi
if [[ $1 == "--delete-cache-no-keystore" || $1 == "--dcnk" ]]; then
log "Deleting builder cache preserving keystore..."
mv $RVB_DIR/revanced/revanced.keystore $HOME/revanced.keystore
rm -rf $RVB_DIR/revanced
mkdir -p $RVB_DIR/revanced
mv $HOME/revanced.keystore $RVB_DIR/revanced/revanced.keystore
delete_cache_no_keystore
fi
cd $RVB_DIR
node .
if [[ $1 == "--delete-cache-after" || $1 == "--dca" ]]; then
delete_cache
fi
if [[ $1 == "--delete-cache-after-no-keystore" || $1 == "--dcank" ]]; then
delete_cache_no_keystore
fi
}

delete_cache() {
# Is this even called a cache?
log "Deleting builder cache..."
rm -rf $RVB_DIR/revanced
}

delete_cache_no_keystore() {
log "Deleting builder cache preserving keystore..."
mv $RVB_DIR/revanced/revanced.keystore $HOME/revanced.keystore
rm -rf $RVB_DIR/revanced
mkdir -p $RVB_DIR/revanced
mv $HOME/revanced.keystore $RVB_DIR/revanced/revanced.keystore
}

reinstall_builder() {
Expand Down

0 comments on commit 4ca8390

Please sign in to comment.