Last active
August 29, 2015 14:03
-
-
Save fiskurgit/ed98b0bf83f2384a406a to your computer and use it in GitHub Desktop.
Bash script to take a screenshot from an attached Android device, and resize (maintaining aspect ratio) to a width of 270 pixels (OSX only).
This file contains 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/sh | |
timestamp=$(date +%s) | |
filepath=/sdcard/$timestamp.png | |
echo $filepath | |
adb shell screencap -p $filepath | |
adb pull $filepath | |
adb shell rm $filepath | |
sips --resampleWidth 270 $timestamp.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment