From aafd0a11b511b3f8314b3a41503adbd1e8901c89 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 5 Apr 2019 12:24:41 -0400 Subject: [PATCH] Add copy to screenshots png --- bin/CPSP | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bin/CPSP diff --git a/bin/CPSP b/bin/CPSP new file mode 100755 index 0000000..b12fd9b --- /dev/null +++ b/bin/CPSP @@ -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"