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

Benjamin Renard commited on 2011-12-21 13:11:33
Showing 1 changed files, with 1 additions and 1 deletions.

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