From 2572c8d2d1b8d804af53d6a772c1b358751a86ad Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 12 Jul 2009 02:14:59 +0200 Subject: rename filebin.sh and change domain --- fb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 fb (limited to 'fb') diff --git a/fb b/fb new file mode 100755 index 0000000..7dc48c9 --- /dev/null +++ b/fb @@ -0,0 +1,32 @@ +#!/bin/sh +#---------------------------------------------------- +# Version: 0.2.3 +# Author: Florian "Bluewind" Pritz +# +# Licensed under WTFPL v2 +# (see COPYING for full license text) +# +#---------------------------------------------------- +# Upload file to my filebin and copy URL to clipboard +# or nopaste stdin +# (only works if useragent contains libcurl) +#---------------------------------------------------- + +tmpfile=0 +if [ -n "$1" ]; then + file=$1 +else + file=$(mktemp) + tmpfile=1 + while read -r input; do + echo "$input" >> $file + done +fi + +URL=$(curl -# -L -F "userfile=@$file" http://paste.xinu.at/file/do_upload) +echo $URL +echo -n $URL | nohup &> /dev/null xclip + +if [ "$tmpfile" == "1" ]; then + rm $file +fi -- cgit v1.2.3-24-g4f1b