-
-
Save JichunMa/f438e013dab0efb202a0eb8cf0c39319 to your computer and use it in GitHub Desktop.
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/bash | |
dir=~/Desktop/screenshot/ | |
curr=`date "+%Y-%m-%d %H:%M:%S"` | |
name=${dir}"screenshot"${curr}".png" | |
echo "${name}" | |
adb start-server | |
adb exec-out screencap -p > "$name" | |
if [ -n "$1" ]; then | |
echo "$1 秒后自动删除" | |
sleep $1 | |
rm "$name" | |
else | |
echo "永久保存" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment