From 7349811832c0a3a62ce7c6bbe18f76e58d7f96d5 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 21 Dec 2011 14:11:33 +0100 Subject: [PATCH] change regex to match download URL (escape tab and space) --- check_rc_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_rc_upgrade.sh b/check_rc_upgrade.sh index 8cf41c4..635d27a 100755 --- a/check_rc_upgrade.sh +++ b/check_rc_upgrade.sh @@ -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"