Skip to content

Commit

Permalink
fix: the update command
Browse files Browse the repository at this point in the history
Signed-off-by: shrihanDev <[email protected]>
  • Loading branch information
shrihankp committed Aug 19, 2022
1 parent f7d8998 commit 22f7891
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions android-interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ dload_and_install () {
log "Unzipping..."
unzip -qqo revanced-builder.zip
rm revanced-builder.zip
mv revanced-builder{-main,}
if [[ "$1" == upd ]]; then
mv -fv revanced-builder-main/* $HOME/revanced-builder
else
mv revanced-builder{-main,}
fi
cd revanced-builder
log "Installing packages..."
npm install --omit=dev
[[ -z $1 ]] && log "Done. Execute \`$SCR_NAME_EXEC run\` to launch the builder."
[[ -z "$2" ]] && log "Done. Execute \`$SCR_NAME_EXEC run\` to launch the builder."
}

preflight () {
Expand Down Expand Up @@ -91,7 +95,7 @@ EOM

if [[ ! -d $HOME/revanced-builder ]]; then
log "revanced-builder not installed. Installing..."
dload_and_install n
dload_and_install not_upd n
else
log "revanced-builder found."
log "All checks done."
Expand Down Expand Up @@ -120,8 +124,7 @@ reinstall_builder () {

update_builder () {
log "Updating revanced-builder..."
cd $HOME/revanced-builder
dload_and_install
dload_and_install upd
}

main () {
Expand Down

0 comments on commit 22f7891

Please sign in to comment.