dotfiles/bin/upload_and_copy
2017-02-15 12:23:57 -05:00

10 lines
307 B
Bash
Executable File

#!/bin/bash
set -e
MD5=($(md5 -q "$@"))
fname=$MD5."${1##*.}"
scp -rp "$1" vpsimgs:/var/www/html/screenshots/$fname;
osascript -e "display notification \"Uploaded $1 to https://tyrelsouza.com/screenshots/$fname\" with title \"Tyrel Upload\""
echo https://tyrelsouza.com/screenshots/$fname | pbcopy
rm "$1"