diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2014-11-05 17:41:11 +0100 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2014-11-05 17:41:11 +0100 |
commit | 7e8413ccb5a5f831b9814edd025d0c239b104d9f (patch) | |
tree | ef7fb9557a512d746cc706601b5a5640714962ec | |
parent | 36a5437abbddd484b8bdb18c024cc7573240054f (diff) | |
parent | ae048633658d99ff970385afe5b529171d89a95f (diff) |
Merge branch '1.4.x'
-rwxr-xr-x | contrib/get-bug-attachments | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/get-bug-attachments b/contrib/get-bug-attachments index 869eee895..80205baff 100755 --- a/contrib/get-bug-attachments +++ b/contrib/get-bug-attachments @@ -29,7 +29,7 @@ function webcat { function webget { if which wget &>/dev/null; then tmpfile="$(mktemp get_bug_attach.$$.XXXXXXXX)" - filename="$(wget -qS -O "$tmpfile" "$1" 2>&1 | grep 'Content-disposition: attachment' | sed 's,.*filename="\(.*\)".*,\1,')" + filename="$(wget -qS -O "$tmpfile" "$1" 2>&1 | grep -i 'Content-disposition: attachment' | sed 's,.*filename="\(.*\)".*,\1,')" ext="$(echo "$filename" | sed 's,.*\.\(.*\),\1,')" if [ -e "$2.$ext" ] && ! diff -q "$tmpfile" "$2.$ext" &>/dev/null; then c=a @@ -46,7 +46,7 @@ function webget { fi elif which curl &>/dev/null; then tmpfile="$(mktemp get_bug_attach.$$.XXXXXXXX)" - filename="$(curl --head "$1" 2>&1 | grep 'Content-disposition: attachment' | sed 's,.*filename="\(.*\)".*,\1,')" + filename="$(curl --head "$1" 2>&1 | grep -i 'Content-disposition: attachment' | sed 's,.*filename="\(.*\)".*,\1,')" curl "$1" >"$tmpfile" 2>/dev/null ext="$(echo "$filename" | sed 's,.*\.\(.*\),\1,')" if [ -e "$2.$ext" ] && ! diff -q "$tmpfile" "$2.$ext" &>/dev/null; then |