projects
/
android-command-line.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31467d1
)
pull backup incrementaly
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 1 Oct 2010 17:04:10 +0000
(19:04 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 1 Oct 2010 17:04:10 +0000
(19:04 +0200)
it's more or less a mess of ls, diff and xargs to pull just new
files using adb
adb-pull-clockworkmod-backup.sh
patch
|
blob
|
history
diff --git
a/adb-pull-clockworkmod-backup.sh
b/adb-pull-clockworkmod-backup.sh
index
4ef4e60
..
ae5008c
100755
(executable)
--- a/
adb-pull-clockworkmod-backup.sh
+++ b/
adb-pull-clockworkmod-backup.sh
@@
-1,3
+1,8
@@
#!/bin/sh -x
-adb pull /sdcard/clockworkmod/backup backup
+sdcard=/sdcard/clockworkmod/
+
+adb shell ls -1 -d $sdcard/backup/* | sed "s!$sdcard/*!!" | tr -d '\r' > /tmp/backup.android
+ls -1 -d backup/* > /tmp/backup.disk
+diff -uw /tmp/backup.android /tmp/backup.disk | grep -- '^-backup' | sed 's/^-//' | \
+xargs -i sh -xc "mkdir {} && adb pull $sdcard/{} {}"