changeset 1401:edc9f4d7f576

* html-gen.sh: fixed case for some cygwin versions, when changelog html generation could end in endless loop.
author Jiri Vanek <jvanek@redhat.com>
date Tue, 25 Apr 2017 11:42:33 +0200
parents 3deb4b2e0213
children bbb78a496f99
files ChangeLog html-gen.sh
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Apr 24 17:05:21 2017 +0200
+++ b/ChangeLog	Tue Apr 25 11:42:33 2017 +0200
@@ -1,3 +1,8 @@
+2017-04-25  Jiri Vanek <jvanek@redhat.com>
+
+	* html-gen.sh: fixed case for some cygwin versions, when changelog
+	html generation could end in endless loop.
+
 2017-04-24  Jiri Vanek <jvanek@redhat.com>
 
 	javaws made to understand jnlp "network protokol"
--- a/html-gen.sh	Mon Apr 24 17:05:21 2017 +0200
+++ b/html-gen.sh	Tue Apr 25 11:42:33 2017 +0200
@@ -141,7 +141,8 @@
                 BOLD=0
             fi
             date_regex=[0-9]{4}-[0-9]{2}-[0-9]{2}
-            if [[ "$LINE" =~ $date_regex* ]] # Matches line starting with eg 2013-07-01
+            cutLine=`echo $LINE | sed "s/&.*//"` # on some versions of windows, the & caused the [[ ]] command to fail
+            if [[ "$cutLine" =~ $date_regex ]] # Matches line starting with eg 2013-07-01
             then
                 html_space="\&ensp;\&ensp;"
                 if [ -n "${REPO_URL}" ]; then