Created
January 19, 2015 07:33
-
-
Save rcombs/239c3d26882b6d20c308 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 | |
cd ~/mpvshots | |
FNAME=$(date "+%Y%m%d-%H%M%S$2") | |
FPATH=`echo -n ~/mpvshots/$FNAME` | |
mv $1 $FNAME | |
OUT=`puush $FNAME` | |
if [[ $? == 0 ]] ; then | |
echo -n $OUT | pbcopy | |
/usr/local/bin/terminal-notifier -open "$OUT" -appIcon /Applications/puush.app/Contents/Resources/Icon.icns -sound "Puush Success" -title "Puushed Screenshot" -subtitle $FNAME -message "Copied to clipboard" -group puush-mpvshots | |
rm $FNAME | |
else | |
/usr/local/bin/terminal-notifier -open file://$FPATH -appIcon /Applications/puush.app/Contents/Resources/Icon.icns -sound "Puush Error" -title "Puush Failed" -subtitle $FNAME -message "Click to open" -group puush-mpvshots | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment