You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
353 B

6 years ago
#!/usr/bin/env bash
# Set MKR_BIN if not set. Export it in your shell rc to use a self hosted
# instance. Include the trailing slash with custom urls.
MKR_BIN=${MKR_BIN:-https://bin.mkr.pw/}
op=$(curl -s -d "@-" -H "Content-Type:text/plain" $MKR_BIN)
link=$(echo $op | cut -f2 -d'/')
echo ${MKR_BIN}${link} | tee /dev/tty | xclip -selection clipboard