]> Pileus Git - vpaste/blobdiff - vpaste
(no commit message)
[vpaste] / vpaste
diff --git a/vpaste b/vpaste
index 79cc6339e596ea88deb5dbf9b7dd889b16af4c0c..0e873237d87a21039c6a9c357caeba52b5c50180 100755 (executable)
--- a/vpaste
+++ b/vpaste
@@ -1,9 +1,9 @@
 #!/bin/bash
 uri="http://andy753421.ath.cx/vpaste/"
-if [ "$1" ]; then
-       out=$(curl -F "x=<$1" "$uri")
+if [ -f "$1" ]; then
+       out=$(curl -F "x=<$1" "$uri?$2")
 else
-       out=$(curl -F 'x=<-' "$uri")
+       out=$(curl -F 'x=<-' "$uri?$1")
 fi
 echo "$out"
 if [ -x "`which xclip 2>/dev/null`" -a "$DISPLAY" ]; then