dotfiles/bin/upload_and_copy

9 lines
225 B
Plaintext
Raw Normal View History

2016-02-20 03:56:16 +00:00
#!/bin/bash
set -e
MD5=($(md5sum "$@" | cut -d ' ' -f 1))
fname=$MD5."${1##*.}"
scp -rp "$1" tyrelsouza.com:/var/www/html/screenshots/$fname;
echo https://tyrelsouza.com/screenshots/$fname | xsel --clipboard --input
rm "$1"