aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/pasteme14
1 files changed, 3 insertions, 11 deletions
diff --git a/scripts/pasteme b/scripts/pasteme
index a47fdc6..db4b641 100755
--- a/scripts/pasteme
+++ b/scripts/pasteme
@@ -1,18 +1,10 @@
#!/bin/bash
file="$1"
-tempfile=""
-
-rmtempfile_cb() { rm "$tempfile"; }
if [ "$file" == "" ]; then
- tempfile="$(mktemp)"
- trap rmtempfile_cb EXIT
- cat > $tempfile
- file=$tempfile
+ file=-
fi
-file="${file/\\/\\\\}"
-file="${file/\"/\\\"}"
-
-curl --form "content=<\"$file\"" http://paste.devys.org/
+cat "$file" \
+ | curl -w '%{redirect_url}\n' --form 'content=<-' http://paste.devys.org/