Last active
August 29, 2016 03:45
-
-
Save xsota/a18d53a863c00b4abdaf7f801775fa2a to your computer and use it in GitHub Desktop.
for mac
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 | |
SAVE_DIR=./screenshot | |
FILE_PATH=$SAVE_DIR/`date +%Y%m%d%H%M%S`.png | |
TMP_FILE=/sdcard/ss.pn | |
# capture screen image | |
mkdir -p $SAVE_DIR 2>/dev/null | |
adb shell screencap -p $TMP_FILE | |
adb pull $TMP_FILE $FILE_PATH | |
adb shell rm $TMP_FILE | |
# resize image | |
sips -Z 320 $FILE_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment