change regex to match download URL (escape tab and space)

This commit is contained in:
Benjamin Renard 2011-12-21 14:11:33 +01:00
parent b12bd8c2d7
commit 7349811832

View file

@ -78,7 +78,7 @@ do
[ $DEBUG -eq 1 ] && echo "Newest : $newest"
rm -f $CACHE_FAILED > /dev/null 2>&1
DOWNLOAD_URL=`cat $tmpfile|grep "$newest"|grep "tar.gz"|head -1|sed 's/.* href="\([^"]*\)" .*$/\1/'`
DOWNLOAD_URL=`cat $tmpfile|grep "$newest"|grep "tar.gz"|head -1|sed 's/.* href="[ \t]*\([^"]*\)[ \t]*" .*$/\1/'`
[ $DEBUG -eq 1 ] && echo "Download URL : $DOWNLOAD_URL"
[ ! -n "$DOWNLOAD_URL" ] && DOWNLOAD_URL="$CHECK_URL" && [ $DEBUG -eq 1 ] && echo "Use check URL as download URL : $DOWNLOAD_URL"