From 4475362294e6c8fd0df4f19c035bed81e595671c Mon Sep 17 00:00:00 2001 From: VG Date: Sat, 29 Nov 2014 16:00:24 +0100 Subject: fix pasteme script --- scripts/pasteme | 14 +++----------- 1 file 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/ -- cgit v1.2.3