Created
June 10, 2015 17:59
-
-
Save cybic/4f6ed0ec85c813bdc825 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ADB=~/Downloads/android-sdk-macosx/platform-tools/adb | |
REMOTE='storage/sdcard0/DCIM/Camera/' | |
HERE='/Users/cybic/files/backup/R2D2-2/images' | |
FILES=$(diff <($ADB shell "ls $REMOTE" | sort | perl -pe "~ s/\r//" ) <( ls $HERE ) | grep \< | sed 's/\<\ //') | |
for f in $FILES | |
do | |
$ADB pull -a -p $REMOTE/$f $HERE | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment