| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function texinfo_updateStructureSection { |
| |
| local PATTERN="${1}" |
| |
| |
| |
| if [[ $PATTERN == '' ]];then |
| PATTERN="${MANUAL_ENTRY}" |
| fi |
| |
| |
| |
| |
| |
| if [[ $PATTERN =~ "${MANUAL_NAME}\.${MANUAL_EXTENSION}$" ]] \ |
| || [[ $PATTERN =~ "chapter\.${MANUAL_EXTENSION}$" ]];then |
| PATTERN="$(dirname ${MANUAL_ENTRY} \ |
| | sed "s,${TCAR_WORKDIR},,")/.+\.${MANUAL_EXTENSION}" |
| fi |
| |
| local MANUAL_ENTRY='' |
| local MANUAL_ENTRIES='' |
| local ACTIONNAM_SECMENU='' |
| local ACTIONNAM_CROSREF='' |
| |
| |
| |
| case "$2" in |
| |
| --delete ) |
| |
| |
| |
| ACTIONNAM_SECMENU='updateSectionMenu --delete-entry' |
| |
| |
| |
| ACTIONNAM_CROSREF='deleteCrossReferences' |
| ;; |
| |
| --update | * ) |
| |
| |
| |
| ACTIONNAM_SECMENU='updateSectionMenu --add-entry' |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| ACTIONNAM_CROSREF='restoreCrossReferences' |
| ;; |
| |
| esac |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| MANUAL_ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR_L10N} \ |
| --pattern="${PATTERN}" | egrep -v "/(${MANUAL_NAME}|chapter)") |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if [[ $MANUAL_ENTRIES == '' ]] && [[ $PATTERN =~ '^/[[:alnum:]./_-]+$' ]];then |
| MANUAL_ENTRIES=${PATTERN} |
| fi |
| |
| |
| |
| |
| if [[ $MANUAL_ENTRIES == '' ]];then |
| cli_printMessage "`gettext "There wasn't any section for processing found."`" --as-error-line |
| fi |
| |
| # Loop through target documentation entries in order to update the |
| # documentation structure (e.g., it is not enough with copying |
| # documentation entry files, it is also needed to update menu, |
| # nodes and related cross-references). |
| for MANUAL_ENTRY in ${MANUAL_ENTRIES};do |
| |
| # Don't print action message here. Instead, use the related |
| |
| |
| |
| |
| texinfo_${ACTIONNAM_SECMENU} |
| texinfo_updateSectionNodes |
| texinfo_makeSeeAlso "${MANUAL_ENTRY}" |
| texinfo_${ACTIONNAM_CROSREF} "${MANUAL_ENTRY}" |
| |
| done |
| |
| } |