Skip to content

Commit

Permalink
Add reinstall command
Browse files Browse the repository at this point in the history
For convenience, provide "./gnirehtet reinstall" that calls "uninstall"
then "install".
  • Loading branch information
rom1v committed Apr 18, 2017
1 parent b496bd6 commit 298d72e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gnirehtet
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ syntax() {
echo " If several devices are connected via adb, then serial must be"
echo " specified."
echo
echo " $0 reinstall [serial]"
echo " Uninstall then install."
echo
echo " $0 rt [serial] [-d DNS[,DNS2,...]]"
echo " Enable reverse tethering for exactly one device:"
echo " - install the client if necessary;"
Expand Down Expand Up @@ -117,6 +120,11 @@ apk_uninstall() {
evalv $(adbs "$serial") uninstall com.genymobile.gnirehtet
}

apk_reinstall() {
apk_uninstall "$@"
apk_install "$@"
}

start() {
echo 'Starting gnirehtet...'
local serial="$1"
Expand Down Expand Up @@ -159,6 +167,9 @@ install)
uninstall)
shift
apk_uninstall "$@";;
reinstall)
shift
apk_reinstall "$@";;
start)
shift
parse_start_args "$@"
Expand Down

0 comments on commit 298d72e

Please sign in to comment.