summaryrefslogtreecommitdiff
path: root/bpaste.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bpaste.sh')
-rw-r--r--bpaste.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bpaste.sh b/bpaste.sh
index 881ff6b..a704de5 100644
--- a/bpaste.sh
+++ b/bpaste.sh
@@ -14,6 +14,9 @@
# projects@yorhel.nl
# License: MIT
#
+# 0.6 - 2018-01-21
+# - Display absolute URL even when the server gives a relative redirect
+#
# 0.5 - 2016-07-02
# - Fix inversion of the -c option
#
@@ -40,7 +43,7 @@ SYNTAX=nosyntax
FILE=-
WRAP=0
CLICK=1
-VERSION=0.5
+VERSION=0.6
showhelp() {
@@ -86,4 +89,5 @@ PASS=
curl -si -A "bpaste $VERSION" -F "f=<$TMPFILE" -F "s=$SYNTAX" -F "w=$WRAP" -F "c=$CLICK" -F "p=$PASS" $HOST\
| grep 'Location: '\
- | sed 's/^Location: //'
+ | sed 's/^Location: http/http/'\
+ | sed "s#^Location: /#$HOST#"