From 2864a76bb0b3db00de96ecb47311e434db889bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 13 Nov 2012 23:11:08 +0100 Subject: [PATCH] add script to rename doxygen macros --- .../conversion_tools/rename_macros.input | 34 +++++++++++++++++++ .../conversion_tools/rename_macros.sh | 23 +++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 Documentation/conversion_tools/rename_macros.input create mode 100644 Documentation/conversion_tools/rename_macros.sh diff --git a/Documentation/conversion_tools/rename_macros.input b/Documentation/conversion_tools/rename_macros.input new file mode 100644 index 00000000000..06875b6e123 --- /dev/null +++ b/Documentation/conversion_tools/rename_macros.input @@ -0,0 +1,34 @@ +cgalexample cgalExample +cgal_figure_anchor cgalFigureAnchor +cgal_figure_ref cgalFigureRef +cgal_figure_begin cgalFigureBegin +cgal_figure_end cgalFigureEnd +cgal_figure_caption_begin cgalFigureCaptionBegin +cgal_figure_caption_end cgalFigureCaptionEnd +cgalconcept cgalConcept +cgalconceptnamespace cgalConceptNamespace +refines cgalRefines +requires cgalRequires +models cgalModels +generalizes cgalGeneralizes +hasModel cgalHasModel +debug cgalDebug +advanced cgalAdvanced +PkgPicture cgalPkgPicture +PkgSummaryBegin cgalPkgSummaryBegin +PkgSummaryEnd cgalPkgSummaryEnd +PkgShortInfoBegin cgalPkgShortInfoBegin +PkgShortInfoEnd cgalPkgShortInfoEnd +PkgAuthor cgalPkgAuthor +PkgAuthors cgalPkgAuthors +PkgDesc cgalPkgDesc +PkgSince cgalPkgSince +PkgDependsOn cgalPkgDependsOn +PkgLicense cgalPkgLicense +PkgDemo cgalPkgDemo +PkgDescriptionEnd cgalPkgDescriptionEnd +PkgBib cgalPkgBib +footnote cgalFootnote +autotoc cgalAutotoc +tag_true cgalTagTrue +tag_false cgalTagFalse diff --git a/Documentation/conversion_tools/rename_macros.sh b/Documentation/conversion_tools/rename_macros.sh new file mode 100644 index 00000000000..a8f7388feef --- /dev/null +++ b/Documentation/conversion_tools/rename_macros.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +nb_lines=`wc -l rename_macros.input | awk '{print $1}'` +sort rename_macros.input -r > /tmp/sorted_rename_macros.input + +for i in `seq 1 $nb_lines`; do + l=`head -n $i /tmp/sorted_rename_macros.input | tail -n 1` + echo $l | awk '{print "s/\\\\" $1 "/\\\\" $2 "/g"}' +done > /tmp/rename_macros.sed + +find ../.. -name '*.txt' -o -name '*.h' | xargs sed -i -f /tmp/rename_macros.sed + + +for i in `seq 1 $nb_lines`; do + l=`head -n $i /tmp/sorted_rename_macros.input | tail -n 1` + echo $l | awk '{print "s/\\\"" $1 "=/\\\"" $2 "=/g"}' + echo $l | awk '{print "s/\\\"" $1 "{/\\\"" $2 "{/g"}' +done > /tmp/rename_macros.sed + +sed -i -f /tmp/rename_macros.sed ../Doxyfile + +#~ find ../.. -name '*.txt' -o -name '*.h' +