summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Ørsted Andresen <zlin@exherbo.org>2009-12-16 18:11:42 +0000
committerBo Ørsted Andresen <zlin@exherbo.org>2009-12-16 18:11:42 +0000
commit29cb3ce9e58078c30f367db462c5befd405fdc28 (patch)
tree65635dd519be92dc10f1416bdcbffd1e205f42c6
parent86596771e00b9e049c20d1ed8e4a427a79a978de (diff)
downloadwgetpaste-29cb3ce9e58078c30f367db462c5befd405fdc28.tar.gz
Move getrecipient.
-rwxr-xr-xwgetpaste6
1 files changed, 3 insertions, 3 deletions
diff --git a/wgetpaste b/wgetpaste
index c0a2690..cd6c098 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -728,6 +728,9 @@ SIZE=$(wc -c <<< "$INPUT")
LINES=$(wc -l <<< "$INPUT")
warnings >&2
+# set recipient
+RECIPIENT=$(getrecipient RAW)
+
# create temp file (wget is much more reliable reading large input via --post-file rather than --post-data)
[[ -f $TMPF ]] || TMPF=$(mktemp /tmp/wgetpaste.XXXXXX)
if [[ -f $TMPF ]]; then
@@ -739,9 +742,6 @@ else
WGETARGS="--post-data=$(postdata | sed -e 's|$|%0a|g' -e 's|\t|%09|g' | tr -d '\n')"
fi
-# set recipient
-RECIPIENT=$(getrecipient RAW)
-
# paste it
WGETARGS="--tries=5 --timeout=60 $WGETARGS"
if geturl needstdout || [[ $DEBUG || ! -w /dev/null ]]; then