X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=adb-pull-clockworkmod-backup.sh;h=ae5008cb8b2194eafcd28ee26e3fd9a5524e881b;hb=202399c196c8ab5b60146e67b717ad668f03e29d;hp=4ef4e600e37659fdf4eae83ce35f09ccf976e957;hpb=e4622c51149a896e464a234c90b00f94c63af7f1;p=android-command-line.git diff --git a/adb-pull-clockworkmod-backup.sh b/adb-pull-clockworkmod-backup.sh index 4ef4e60..ae5008c 100755 --- 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/{} {}"