aboutsummaryrefslogtreecommitdiffstats
path: root/adb/commandline.c
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-01-05 13:42:25 -0800
committerJoe Onorato <joeo@android.com>2010-01-05 13:42:25 -0800
commit00c0eeac6be1597ce24fccf8e2afaaffab223cb3 (patch)
treef63b6c6d2753c23c724e262f11fde6fd7c7e19d1 /adb/commandline.c
parentd674413ff460afe1da049e54bb7a489132799749 (diff)
downloadsystem_core-00c0eeac6be1597ce24fccf8e2afaaffab223cb3.tar.gz
system_core-00c0eeac6be1597ce24fccf8e2afaaffab223cb3.tar.bz2
system_core-00c0eeac6be1597ce24fccf8e2afaaffab223cb3.zip
Make adb pull use . as the target file directory if you don't supply one.
Diffstat (limited to 'adb/commandline.c')
-rw-r--r--adb/commandline.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/adb/commandline.c b/adb/commandline.c
index cb98d05f..b96674fa 100644
--- a/adb/commandline.c
+++ b/adb/commandline.c
@@ -110,7 +110,7 @@ void help()
"\n"
"device commands:\n"
" adb push <local> <remote> - copy file/dir to device\n"
- " adb pull <remote> <local> - copy file/dir from device\n"
+ " adb pull <remote> [<local>] - copy file/dir from device\n"
" adb sync [ <directory> ] - copy host->device only if changed\n"
" (see 'adb help all')\n"
" adb shell - run remote shell interactively\n"
@@ -1022,8 +1022,13 @@ top:
}
if(!strcmp(argv[0], "pull")) {
- if(argc != 3) return usage();
- return do_sync_pull(argv[1], argv[2]);
+ if (argc == 2) {
+ return do_sync_pull(argv[1], ".");
+ } else if (argc == 3) {
+ return do_sync_pull(argv[1], argv[2]);
+ } else {
+ return usage();
+ }
}
if(!strcmp(argv[0], "install")) {