summaryrefslogtreecommitdiff
path: root/app-text/wgetpaste/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-06 10:28:05 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-06 10:28:05 +0100
commitf1af93971b7490792d8541bc790e0d8c6d787059 (patch)
treea38046712bbc3a3844d77452d16c84e716caa3d4 /app-text/wgetpaste/files
parentfc637fb28da700da71ec2064d65ca5a7a31b9c6c (diff)
gentoo resync : 06.08.2019
Diffstat (limited to 'app-text/wgetpaste/files')
-rw-r--r--app-text/wgetpaste/files/wgetpaste-2.29-fix-bpaste.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/app-text/wgetpaste/files/wgetpaste-2.29-fix-bpaste.patch b/app-text/wgetpaste/files/wgetpaste-2.29-fix-bpaste.patch
new file mode 100644
index 000000000000..0af9a6f855d7
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.29-fix-bpaste.patch
@@ -0,0 +1,40 @@
+From 6175f89cb618fef83882ed86ab049a7fd1035770 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bo=20=C3=98rsted=20Andresen?= <zlin@exherbo.org>
+Date: Tue, 23 Jul 2019 00:16:19 +0200
+Subject: [PATCH] Fix handling of bpaste urls.
+
+---
+ wgetpaste | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/wgetpaste b/wgetpaste
+index 585fcd9..99eb7f1 100755
+--- a/wgetpaste
++++ b/wgetpaste
+@@ -181,7 +181,8 @@ xml+cheetah xml+django xml+evoque xml+lasso xml+mako xml+myghty xml+php xml+erb
+ xml+velocity xml xquery xslt xtend yaml"
+ EXPIRATIONS_pinnwand="1day 1week 1month never"
+ POST_pinnwand="submit=Paste! % % lexer expiry % code"
+-REGEX_RAW_pinnwand='s|^\(https\?://[^/]*/\)show\(/[[:alnum:]]*/\?\)$|\1raw\2|'
++REGEX_LOC_pinnwand="\(/show/[^ ]*\).*$|https://bpaste.net\1"
++REGEX_RAW_pinnwand='s|^\(https\?://[^/]*/\)show\(/[^ ]*/\?\)$|\1raw\2|'
+
+ ### errors
+ die() {
+@@ -550,11 +551,15 @@ postdata() {
+
+ # get url from response from server
+ geturl() {
+- local regex
++ local regex location
+ regex=REGEX_URL_$ENGINE
++ location=REGEX_LOC_$ENGINE
+ if [[ -n ${!regex} ]]; then
+ [[ needstdout = $1 ]] && return 0
+ sed -n -e "${!regex}" <<< "$*"
++ elif [[ -n ${!location} ]]; then
++ [[ needstdout = $1 ]] && return 1
++ sed -n -e "s|^.*Location: ${!location}|p" <<< "$*"
+ else
+ [[ needstdout = $1 ]] && return 1
+ sed -n -e 's|^.*Location: \(https\{0,1\}://[^ ]*\).*$|\1|p' <<< "$*"