Created
July 29, 2009 15:45
-
-
Save ericboehs/158229 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 | |
## Screenshot script for Mac OS X | |
## Author: Eric Boehs | |
## URL: ericboehs.com | |
# Set these variables: | |
USERNAME=ericboehs | |
SERVER=ericboehs.com | |
DIR=\~/ericboehs.com/screenshots/ | |
FILENAME=`date +%Y%m%d-%H%M%S` | |
URL=http://ericboehs.com/screenshots/$FILENAME.png | |
GROWLLOCATION=/usr/local/bin/growlnotify | |
################################## | |
### DO NOT EDIT BELOW THIS BOX ### | |
################################## | |
mkdir -p /tmp/screenshots | |
/usr/sbin/screencapture -i /tmp/screenshots/$FILENAME.png | |
if [ -e /tmp/screenshots/$FILENAME.png ] | |
then | |
scp /tmp/screenshots/$FILENAME.png $USERNAME@$SERVER:$DIR | |
echo -n $URL | pbcopy | |
echo -n $FILENAME.png has been uploaded to $SERVER and the URL was copied to the Clip Board. | $GROWLLOCATION -t Upload Complete -i png | |
#open $URL | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment