dotfiles/home/bin/SCmd
2023-01-02 00:04:28 -05:00

15 lines
422 B
Bash
Executable File

#!/bin/bash
set -e
FILENAME="/Users/tyrel/tmp/screenshot.png"
screencapture -io $FILENAME
sleep 1
MD5=($(md5 -q "$FILENAME"))
fname=$MD5.png
scp -rp "$FILENAME" vps:/www/tyrelsouza.com/screenshots/$fname;
osascript -e "display notification \"Uploaded $FILENAME to https://tyrelsouza.com/screenshots/$fname\" with title \"Tyrel Upload\""
echo -ne "![](https://tyrelsouza.com/screenshots/$fname)" | pbcopy
rm "$FILENAME"