From 574995bd2cafbd0d96842e5c8fdff176bb0a36df Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jul 18 2011 16:28:15 +0000 Subject: Update `texinfo_updateSectionNodes.sh': - When building section nodes, be sure that only the first cindex definition be updated. This way, section indices defined by users will survive a section node actualization. --- diff --git a/Scripts/Functions/Help/Texinfo/texinfo_updateSectionNodes.sh b/Scripts/Functions/Help/Texinfo/texinfo_updateSectionNodes.sh index c1d4a87..5ab4c19 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_updateSectionNodes.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_updateSectionNodes.sh @@ -112,12 +112,16 @@ function texinfo_updateSectionNodes { # Replace node, section and concept index definitions already # defined with node, section and concept index translation - # markers. Otherwise, incorrect sectioning may happen. + # markers. Otherwise, incorrect sectioning may happen. Take + # care with index definitions, more than one index definition + # might be found in the section file but only the first + # concept index entry (i.e., `cindex') will be updated, the + # rest will remain as they are. sed -i -r \ - -e '/@node/c@node =NODE=' \ - -e '/@section/c@section =SECT=' \ - -e '/@cindex/c@cindex =CIND=' \ - "${MANUAL_BASEDIR_L10N}/$INCL" + -e '/^@node/c@node =NODE=' \ + -e '/^@section/c@section =SECT=' \ + -e '0,/^@cindex/c@cindex =CIND=' \ + "${MANUAL_BASEDIR_L10N}/$INCL" # Expand noce, section and concept index translation # markers in documentation entry.