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

androdeb: add androdeb pull command #5

Merged
merged 1 commit into from
Jun 25, 2018
Merged

androdeb: add androdeb pull command #5

merged 1 commit into from
Jun 25, 2018

Conversation

ErickReyesR
Copy link
Contributor

There was already "androdeb pull" command, which did a git pull. This was renamed to "androdeb git-pull". The new command makes it easier to retrieve files from the androdeb filesystem. The same options as "adb pull" are supported.

androdeb Outdated
##########################################################
# GIT-PULL
##########################################################

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lose these extra new lines, and comments. Lets keep it as small a change as possible. The code is self-documenting.

androdeb Outdated
exit 0
fi


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please no extra new lines

androdeb Outdated
@@ -95,6 +127,7 @@ if [ ! -z ${ASHELL+x} ]; then
exit 0
fi


##########################################################
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why newline?

androdeb Outdated
shift || true
fi

if [ "2" -le "$#" ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not: if [ $# -le 2 ]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to check if 2 or more arguments are remaining (multiple files / local destination specified), I guess it could be:

if [$# -gt 1 ]

androdeb Outdated
done
else
FILES["0"]=/data/androdeb/debian/$1
shift || true
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this shift needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to consume the argument because the last argument (local destination) is passed through below

@ErickReyesR
Copy link
Contributor Author

Joel,

I refactored the function to make it easier to understand and got rid of the extra lines. Mind taking a look?

There was already "androdeb pull" command, which did a git pull. This
was renamed to "androdeb git-pull". The new command makes it easier to
retrieve files from the androdeb filesystem. The same options as "adb
pull" are supported.

Signed-off-by: Erick Reyes <erickreyes@google.com>
@joelagnel joelagnel merged commit 925a9f5 into joelagnel:master Jun 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants