1#!/bin/sh
2
3url="https://bin.wantguns.dev"
4filepath="$1"
5filename=$(basename -- "$filepath")
6extension="${filename##*.}"
7
8response=$(curl --data-binary @${filepath:-/dev/stdin} --url $url)
9echo "$url$response"".""$extension" | tee >(xclip -selection clipboard)
10echo "$url$response"".""$extension" >> $HOME/.bin.wantguns.dev
11