#!/bin/bash
-uri="http://andy753421.ath.cx/vpaste/"
-if [ "$1" ]; then
- out=$(curl -F "x=<$1" "$uri")
+
+# Andy Spencer 2009-2011 - Public domain
+
+uri="http://vpaste.net/"
+if [ -f "$1" ]; then
+ out=$(curl -s -F "text=<$1" "$uri?$2")
else
- out=$(curl -F 'x=<-' "$uri")
+ out=$(curl -s -F 'text=<-' "$uri?$1")
fi
echo "$out"
if [ -x "`which xclip 2>/dev/null`" -a "$DISPLAY" ]; then