Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
androdeb: fix issues with androdeb push command
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ErickReyesR committed Jun 28, 2018
1 parent 5104a6c commit 3de5dfb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
15 changes: 0 additions & 15 deletions androdeb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
11 changes: 11 additions & 0 deletions utils/android
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 3de5dfb

Please sign in to comment.