From: Gerald Pfeifer Date: Mon, 2 Dec 2013 20:07:14 +0000 (+0000) Subject: update_web_docs_svn: Work around makeinfo generated file names and references with... X-Git-Tag: releases/gcc-4.9.0~2328 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52cacf7207de329a48b63f1a4cf1cb3cef37fdea;p=thirdparty%2Fgcc.git update_web_docs_svn: Work around makeinfo generated file names and references with "_002d" instead... * update_web_docs_svn: Work around makeinfo generated file names and references with "_002d" instead of "-". From-SVN: r205600 --- diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index 8f18264fa6c4..867d0ca47716 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,8 @@ +2013-12-02 Gerald Pfeifer + + * update_web_docs_svn: Work around makeinfo generated file names + and references with "_002d" instead of "-". + 2013-04-12 Jakub Jelinek * crontab: Disable snapshots from gcc-4_6-branch. diff --git a/maintainer-scripts/update_web_docs_svn b/maintainer-scripts/update_web_docs_svn index cfc33c42bf50..8a5883eeca7e 100755 --- a/maintainer-scripts/update_web_docs_svn +++ b/maintainer-scripts/update_web_docs_svn @@ -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