Add copy to screenshots png

This commit is contained in:
Tyrel Souza 2019-04-05 12:24:41 -04:00
parent 971d9b12f9
commit aafd0a11b5
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0

14
bin/CPSP Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
FILENAME="/Users/tyrel/tmp/copied.png"
/usr/local/bin/pngpaste $FILENAME
sleep 1
MD5=($(md5 -q "$FILENAME"))
fname=$MD5.png
scp -rp "$FILENAME" vps:/www/tyrelsouza.com/screenshots/cp-$fname;
osascript -e "display notification \"Uploaded $FILENAME to https://tyrelsouza.com/screenshots/cp-$fname\" with title \"Tyrel Upload\""
echo https://tyrelsouza.com/screenshots/cp-$fname | pbcopy
# rm "$FILENAME"