From d29d16b27ae435bf603bd67182925e21cb425512 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 10 Apr 2012 16:14:28 -0500 Subject: [PATCH] apply-from-gmane: grok mid.gmane.org URLs and strip newlines from URLs Signed-off-by: Johannes Schindelin --- bin/apply-from-gmane.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/apply-from-gmane.sh b/bin/apply-from-gmane.sh index beffd319..d40b42c4 100755 --- a/bin/apply-from-gmane.sh +++ b/bin/apply-from-gmane.sh @@ -3,12 +3,16 @@ URL="$1" case "$URL" in +http://mid.gmane.org*) + TMP=.git/apply.tmp + curl -D $TMP "$URL" > /dev/null + URL=$(sed -n 's/^Location: //p' < $TMP | tr -d '\r\n');; http://thread.*) URL=http://article.${URL#http://thread.};; http://*|article.gmane.org*) ;; *@*) TMP=.git/apply.tmp curl -D $TMP http://mid.gmane.org/$1 > /dev/null - URL=$(sed -n 's/^Location: //p' < $TMP);; + URL=$(sed -n 's/^Location: //p' < $TMP | tr -d '\r\n');; *) URL=http://article.gmane.org/gmane.comp.version-control.msysgit/$1;; esac -- 2.11.4.GIT