X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=vpaste;h=2b677dc234c00c6cd8ba608dc350608dbd99096c;hb=HEAD;hp=79cc6339e596ea88deb5dbf9b7dd889b16af4c0c;hpb=caa8a608303db243c12aff8586fbe41bdf2e562c;p=vpaste diff --git a/vpaste b/vpaste index 79cc633..2b677dc 100755 --- a/vpaste +++ b/vpaste @@ -1,9 +1,12 @@ -#!/bin/bash -uri="http://andy753421.ath.cx/vpaste/" -if [ "$1" ]; then - out=$(curl -F "x=<$1" "$uri") +#!/bin/sh + +# Andy Spencer - 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