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

androdeb: add androdeb pull command#5

Merged
joelagnel merged 1 commit intojoelagnel:masterfrom
ErickReyesR:master
Jun 25, 2018
Merged

androdeb: add androdeb pull command#5
joelagnel merged 1 commit intojoelagnel:masterfrom
ErickReyesR:master

Conversation

@ErickReyesR
Copy link
Copy Markdown
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.

Comment thread androdeb Outdated
##########################################################
# GIT-PULL
##########################################################

Copy link
Copy Markdown
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.

Comment thread androdeb Outdated
exit 0
fi


Copy link
Copy Markdown
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

Comment thread androdeb
fi


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

Choose a reason for hiding this comment

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

why newline?

Comment thread androdeb Outdated
shift || true
fi

if [ "2" -le "$#" ]; then
Copy link
Copy Markdown
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
Copy Markdown
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 ]

Comment thread androdeb Outdated
done
else
FILES["0"]=/data/androdeb/debian/$1
shift || true
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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