Add mbin.sh

This commit is contained in:
Ceda EI 2018-11-16 14:42:06 +05:30
parent a0631e2789
commit 184f5c9b33
1 changed files with 9 additions and 0 deletions

9
mbin.sh Executable file
View File

@ -0,0 +1,9 @@
#!/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