From 3de5dfbc816862ed5d34386fc88e26684a9d21c8 Mon Sep 17 00:00:00 2001 From: Erick Reyes Date: Thu, 28 Jun 2018 16:15:41 -0700 Subject: [PATCH] androdeb: fix issues with androdeb push command push command had an incorrect '--sync' parameter, this was a misunderstanding of the adb command usage, removed moved the helper function count_sources to utils/android Signed-off-by: Erick Reyes --- androdeb | 15 --------------- utils/android | 11 +++++++++++ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/androdeb b/androdeb index 80ade36..5900341 100755 --- a/androdeb +++ b/androdeb @@ -63,17 +63,6 @@ if [ ! -z "$GIT_PULL" ]; then exit 0 fi -# Helper function to count number of source arguments in a list -# when more than one argument is supplied, it is assumed the last argument -# is a destination -function count_sources() { - local source_count=$# - if [ $source_count -gt 1 ]; then - source_count=$((source_count - 1)) - fi - echo "$source_count" -} - if [ ! -z "$PULL" ]; then if [ $1 == "-a" ]; then PRESERVE="-a" @@ -92,10 +81,6 @@ if [ ! -z "$PULL" ]; then fi if [ ! -z "$PUSH" ]; then - if [ $1 == "--sync" ]; then - sync=$1 - shift || true - fi file_count=`count_sources $@` i=0 while [ $i -lt $file_count ]; do diff --git a/utils/android b/utils/android index 7ad11be..d7db55f 100755 --- a/utils/android +++ b/utils/android @@ -51,3 +51,14 @@ die_if_no_androdeb() { if [ $? -ne 0 ]; then die 8 "Existing androdeb env not found on device. $1"; fi set -e } + +# Helper function to count number of source arguments in a list +# when more than one argument is supplied, it is assumed the last argument +# is a destination +count_sources() { + local source_count=$# + if [ $source_count -gt 1 ]; then + source_count=$((source_count - 1)) + fi + echo "$source_count" +} \ No newline at end of file