update_web_docs_svn: Work around makeinfo generated file names and references with...
authorGerald Pfeifer <gerald@pfeifer.com>
Mon, 2 Dec 2013 20:07:14 +0000 (20:07 +0000)
committerGerald Pfeifer <gerald@gcc.gnu.org>
Mon, 2 Dec 2013 20:07:14 +0000 (20:07 +0000)
* update_web_docs_svn: Work around makeinfo generated file names
and references with "_002d" instead of "-".

From-SVN: r205600

maintainer-scripts/ChangeLog
maintainer-scripts/update_web_docs_svn

index 8f18264fa6c411514be2462d52888bf83b5657bf..867d0ca477168fa79caa5f9ee762aa0671969930 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-02  Gerald Pfeifer  <gerald@pfeifer.com>
+
+       * update_web_docs_svn: Work around makeinfo generated file names
+       and references with "_002d" instead of "-".
+
 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
 
        * crontab: Disable snapshots from gcc-4_6-branch.
index cfc33c42bf50a501da4739b9c1cbd0a991fac52c..8a5883eeca7e04ddf48650e0087dbb2938a31083 100755 (executable)
@@ -172,6 +172,19 @@ for file in $MANUALS; do
   fi
 done
 
+# Work around makeinfo generated file names and references with
+# "_002d" instead of "-".
+find . -name '*.html' | while read f; do
+  # Do this for the contents of each file.
+  sed -i -e 's/_002d/-/g' "$f"
+  # And rename files if necessary.
+  ff=`echo $f | sed -e 's/_002d/-/g'`;
+  if [ "$f" != "$ff" ]; then
+    printf "Renaming %s to %s\n" "$f" "$ff" 
+    mv "$f" "$ff"
+  fi
+done
+
 # Then build a gzipped copy of each of the resulting .html, .ps and .tar files
 for file in */*.html *.ps *.pdf *.tar; do
   cat $file | gzip --best > $file.gz