From 802774d7dfc1b1731556b8e7e3832f9af18335a5 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Oct 14 2012 02:33:59 +0000 Subject: Update `Functions/Help/Texinfo/texinfo_updateStructureSection.sh' file. --- diff --git a/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateStructureSection.sh b/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateStructureSection.sh index 0f1a21f..a4114be 100755 --- a/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateStructureSection.sh +++ b/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateStructureSection.sh @@ -26,17 +26,11 @@ function texinfo_updateStructureSection { - local PATTERN='' - local MANUAL_ENTRY='' - local MANUAL_ENTRIES='' - local ACTIONNAM_SECMENU='' - local ACTIONNAM_CROSREF='' + local PATTERN="${1}" # Define regular expression pattern used to build the list of # section entries that will be processed. - if [[ "$1" != '' ]];then - PATTERN="$1" - else + if [[ $PATTERN == '' ]];then PATTERN="${MANUAL_ENTRY}" fi @@ -46,9 +40,15 @@ function texinfo_updateStructureSection { # the command-line (e.g., `centos-art help --update-structure'). if [[ $PATTERN =~ "${MANUAL_NAME}\.${MANUAL_EXTENSION}$" ]] \ || [[ $PATTERN =~ "chapter\.${MANUAL_EXTENSION}$" ]];then - PATTERN="$(dirname ${MANUAL_ENTRY})/.+\.${MANUAL_EXTENSION}" + PATTERN="$(dirname ${MANUAL_ENTRY} \ + | sed "s,${TCAR_WORKDIR},,")/.+\.${MANUAL_EXTENSION}" fi + local MANUAL_ENTRY='' + local MANUAL_ENTRIES='' + local ACTIONNAM_SECMENU='' + local ACTIONNAM_CROSREF='' + # Define action to perform on menu, nodes and cross references # definitions. case "$2" in