Skip to content

Commit

Permalink
Smarter getting of the newest screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
rozPierog committed Feb 11, 2022
1 parent 08d5949 commit fa2218e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/pullScreenshots
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ pathToScreenshots="sdcard/Pictures/"

for i in "${screenshotsNames[@]}"
do
adb pull "$pathToScreenshots$i$screenshotFormat" "$pathToMetadata$i$screenshotFormat"
newestScreenshot=$(adb shell ls -t $pathToScreenshots | grep "$i" | head -1)
adb pull "$pathToScreenshots$newestScreenshot" "$pathToMetadata$i$screenshotFormat"
done

0 comments on commit fa2218e

Please sign in to comment.