From 448d34260a1b62698f6a9a7078acc5ac98e68ec9 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jun 18 2011 16:49:38 +0000 Subject: Update `help' functionality: - Rename FUNCNAM to MANUAL_BACKEND inside Texinfo/texinfo_*.sh files to coincide function names correctly. --- diff --git a/Scripts/Functions/Help/Texinfo/texinfo.sh b/Scripts/Functions/Help/Texinfo/texinfo.sh index caca080..960b5b8 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo.sh @@ -71,7 +71,7 @@ function texinfo { fi # Create documentation structure, if it doesn't exist. - ${FUNCNAM}_createStructure + ${MANUAL_BACKEND}_createStructure # Syncronize changes between repository and working copy. At this # point, changes in the repository are merged in the working copy @@ -86,13 +86,13 @@ function texinfo { # don't need action value at all (e.g., searching, reading and # updating output files). This way, the execution of backend # functionalities is splitted here. - if [[ $ACTIONNAM =~ "${FUNCNAM}_(copy|rename|delete)Entry" ]];then + if [[ $ACTIONNAM =~ "${MANUAL_BACKEND}_(copy|rename|delete)Entry" ]];then # Execute backend action names that may need to use more than # one action value. ${ACTIONNAM} $ARGUMENTS - elif [[ $ACTIONNAM =~ "${FUNCNAM}_(search(Index|Node)|updateOutputFiles)" ]];then + elif [[ $ACTIONNAM =~ "${MANUAL_BACKEND}_(search(Index|Node)|updateOutputFiles)" ]];then # Execute backend action names that might not need any action # value as reference to do their work. @@ -109,7 +109,7 @@ function texinfo { for ACTIONVAL in $ARGUMENTS;do # Define documentation entry. - MANUAL_ENTRY=$(${FUNCNAM}_getEntry $ACTIONVAL) + MANUAL_ENTRY=$(${MANUAL_BACKEND}_getEntry $ACTIONVAL) # Execute backend action names that may need to use more # than one action value. @@ -126,6 +126,6 @@ function texinfo { cli_commitRepoChanges ${MANUAL_CHAPTER_DIR} # Rebuild output files to propagate recent changes. - ${FUNCNAM}_updateOutputFiles + ${MANUAL_BACKEND}_updateOutputFiles } diff --git a/Scripts/Functions/Help/Texinfo/texinfo_copyEntry.sh b/Scripts/Functions/Help/Texinfo/texinfo_copyEntry.sh index 266618e..246aad2 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_copyEntry.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_copyEntry.sh @@ -39,11 +39,11 @@ function texinfo_copyEntry { # Define source documentation entry. This is the documentation # entry that will be duplicated. - local MANUAL_ENTRY_SRC=$(${FUNCNAM}_getEntry "${1}") + local MANUAL_ENTRY_SRC=$(${MANUAL_BACKEND}_getEntry "${1}") # Define target documentation entry. This is the new documentation # entry created from the source documentation entry. - local MANUAL_ENTRY_DST=$(${FUNCNAM}_getEntry "${2}") + local MANUAL_ENTRY_DST=$(${MANUAL_BACKEND}_getEntry "${2}") # Verify parent directory of target documentation entry. If it # doesn't exist, create it and add it to version control. @@ -97,12 +97,12 @@ function texinfo_copyEntry { # Update menu and node definitions from manual sections to # reflect the changes. - ${FUNCNAM}_updateMenu - ${FUNCNAM}_updateNodes + ${MANUAL_BACKEND}_updateMenu + ${MANUAL_BACKEND}_updateNodes # Update cross reference definitions from manual to reflect # the changes. - ${FUNCNAM}_restoreCrossReferences $MANUAL_ENTRY + ${MANUAL_BACKEND}_restoreCrossReferences $MANUAL_ENTRY done diff --git a/Scripts/Functions/Help/Texinfo/texinfo_createStructure.sh b/Scripts/Functions/Help/Texinfo/texinfo_createStructure.sh index bac1c23..bf59c64 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_createStructure.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_createStructure.sh @@ -60,14 +60,14 @@ function texinfo_createStructure { done # Update manual chapter related files. - ${FUNCNAM}_createChapters + ${MANUAL_BACKEND}_createChapters # Update manual chapter related menu. - ${FUNCNAM}_updateChaptersMenu + ${MANUAL_BACKEND}_updateChaptersMenu # Update manual chapter related nodes (based on chapter related # menu). - ${FUNCNAM}_updateChaptersNodes + ${MANUAL_BACKEND}_updateChaptersNodes # Commit changes from working copy to central repository only. At # this point, changes in the repository are not merged in the diff --git a/Scripts/Functions/Help/Texinfo/texinfo_deleteCrossReferences.sh b/Scripts/Functions/Help/Texinfo/texinfo_deleteCrossReferences.sh index 4d55858..ed97226 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_deleteCrossReferences.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_deleteCrossReferences.sh @@ -42,7 +42,7 @@ function texinfo_deleteCrossReferences { fi # Build the node string using entry location. - local NODE=$(${FUNCNAM}_getNode "$MANUAL_ENTRY") + local NODE=$(${MANUAL_BACKEND}_getNode "$MANUAL_ENTRY") # Define regular expression patterns for texinfo cross reference # commands. diff --git a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntry.sh b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntry.sh index ed57b4a..4cf987c 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_deleteEntry.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_deleteEntry.sh @@ -31,7 +31,7 @@ function texinfo_deleteEntry { # Define list of entries to remove using the entry specified in # the command line. - local MANUAL_ENTRIES=$(${FUNCNAM}_getEntry "$@") + local MANUAL_ENTRIES=$(${MANUAL_BACKEND}_getEntry "$@") # Print separator line. cli_printMessage '-' --as-separator-line @@ -125,12 +125,12 @@ function texinfo_deleteEntry { # Update menu and node definitions from manual sections to # reflect the changes. - ${FUNCNAM}_updateMenu "remove-entry" - ${FUNCNAM}_updateNodes + ${MANUAL_BACKEND}_updateMenu "remove-entry" + ${MANUAL_BACKEND}_updateNodes # Update cross reference definitions from manual to reflect # the changes. - ${FUNCNAM}_deleteCrossReferences $MANUAL_ENTRY + ${MANUAL_BACKEND}_deleteCrossReferences $MANUAL_ENTRY done diff --git a/Scripts/Functions/Help/Texinfo/texinfo_editEntry.sh b/Scripts/Functions/Help/Texinfo/texinfo_editEntry.sh index 714b25b..75ebb50 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_editEntry.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_editEntry.sh @@ -49,11 +49,11 @@ function texinfo_editEntry { cli_printMessage "`gettext "Do you want to continue?"`" --as-yesornorequest-line # Update chapter section related menu. - ${FUNCNAM}_updateMenu + ${MANUAL_BACKEND}_updateMenu # Update chapter section related nodes (based on chapter # section related menu). - ${FUNCNAM}_updateNodes + ${MANUAL_BACKEND}_updateNodes # Update old missing cross references. If for some reason a # documentation entry is removed by mistake, and that mistake @@ -61,7 +61,7 @@ function texinfo_editEntry { # into the repository, rebuild the missing cross reference # message to use the correct link to the documentation # section. - ${FUNCNAM}_restoreCrossReferences $MANUAL_ENTRY + ${MANUAL_BACKEND}_restoreCrossReferences $MANUAL_ENTRY else diff --git a/Scripts/Functions/Help/Texinfo/texinfo_getChapterDir.sh b/Scripts/Functions/Help/Texinfo/texinfo_getChapterDir.sh index 44a8a88..153f7bb 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_getChapterDir.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_getChapterDir.sh @@ -40,7 +40,7 @@ function texinfo_getChapterDir { # their own files, they all will be written inside the same # section file that represents the repository documentation entry. for MANUAL_ENTRY in $MANUAL_ENTRIES;do - ${FUNCNAM}_getEntry $MANUAL_ENTRY | cut -d / -f-8 + ${MANUAL_BACKEND}_getEntry $MANUAL_ENTRY | cut -d / -f-8 done | sort | uniq } diff --git a/Scripts/Functions/Help/Texinfo/texinfo_renameCrossReferences.sh b/Scripts/Functions/Help/Texinfo/texinfo_renameCrossReferences.sh index 755d708..f7c244f 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_renameCrossReferences.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_renameCrossReferences.sh @@ -26,14 +26,14 @@ function texinfo_renameCrossReferences { - local MANUAL_ENTRY_SRC=$(${FUNCNAM}_getEntry "$1") - local MANUAL_ENTRY_DST=$(${FUNCNAM}_getEntry "$2") + local MANUAL_ENTRY_SRC=$(${MANUAL_BACKEND}_getEntry "$1") + local MANUAL_ENTRY_DST=$(${MANUAL_BACKEND}_getEntry "$2") # Define node pattern for source documenation entry. - local NODE_SRC=$(${FUNCNAM}_getNode "$MANUAL_ENTRY_SRC") + local NODE_SRC=$(${MANUAL_BACKEND}_getNode "$MANUAL_ENTRY_SRC") # Define node replacement for target documentation entry. - local NODE_DST=$(${FUNCNAM}_getNode "$MANUAL_ENTRY_DST") + local NODE_DST=$(${MANUAL_BACKEND}_getNode "$MANUAL_ENTRY_DST") # Define list of entries to process. local MANUAL_ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR} \ @@ -67,6 +67,6 @@ function texinfo_renameCrossReferences { # source to target documentation entry, but they are still # commented. So, uncomment them restoring target documentation # entries. - ${FUNCNAM}_restoreCrossReferences "${MANUAL_ENTRY_DST}" + ${MANUAL_BACKEND}_restoreCrossReferences "${MANUAL_ENTRY_DST}" } diff --git a/Scripts/Functions/Help/Texinfo/texinfo_renameEntry.sh b/Scripts/Functions/Help/Texinfo/texinfo_renameEntry.sh index c3335d9..022ca76 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_renameEntry.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_renameEntry.sh @@ -26,17 +26,17 @@ function texinfo_renameEntry { # Copy source documentation entry. - ${FUNCNAM}_copyEntry "$1" "$2" + ${MANUAL_BACKEND}_copyEntry "$1" "$2" # Delete source documentation entry. The source documentation # entry has been copied already, so to create the rename effect # delete it from repository filesystem. - ${FUNCNAM}_deleteEntry "$1" + ${MANUAL_BACKEND}_deleteEntry "$1" # At this point, source documentation entry has been removed and # all menu, nodes and cross-references have been commented. So, # replace commented menu, nodes and cross-reference information # from source to target documentation entry. - ${FUNCNAM}_renameCrossReferences "$1" "$2" + ${MANUAL_BACKEND}_renameCrossReferences "$1" "$2" } diff --git a/Scripts/Functions/Help/Texinfo/texinfo_restoreCrossReferences.sh b/Scripts/Functions/Help/Texinfo/texinfo_restoreCrossReferences.sh index 615079c..8dfff4f 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_restoreCrossReferences.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_restoreCrossReferences.sh @@ -46,7 +46,7 @@ function texinfo_restoreCrossReferences { fi # Build the node string using entry location. - local NODE=$(${FUNCNAM}_getNode "$MANUAL_ENTRY") + local NODE=$(${MANUAL_BACKEND}_getNode "$MANUAL_ENTRY") # Define regular expression patterns to match removed message # format produced by message_removeCrossReferences function. diff --git a/Scripts/Functions/Help/Texinfo/texinfo_searchIndex.sh b/Scripts/Functions/Help/Texinfo/texinfo_searchIndex.sh index 536997d..18fdf23 100644 --- a/Scripts/Functions/Help/Texinfo/texinfo_searchIndex.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_searchIndex.sh @@ -26,7 +26,7 @@ function texinfo_searchIndex { # Rebuild output files to propagate recent changes. - ${FUNCNAM}_updateOutputFiles + ${MANUAL_BACKEND}_updateOutputFiles # Print separator line. cli_printMessage '-' --as-separator-line diff --git a/Scripts/Functions/Help/Texinfo/texinfo_searchNode.sh b/Scripts/Functions/Help/Texinfo/texinfo_searchNode.sh index ae0a811..fffb7d5 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_searchNode.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_searchNode.sh @@ -30,7 +30,7 @@ function texinfo_searchNode { # Define list of documentation entries. local MANUAL_ENTRY='' - local MANUAL_ENTRIES=$(${FUNCNAM}_getEntry "$@") + local MANUAL_ENTRIES=$(${MANUAL_BACKEND}_getEntry "$@") # Loop through manual entries and read related node. for MANUAL_ENTRY in $MANUAL_ENTRIES;do @@ -43,9 +43,9 @@ function texinfo_searchNode { # the info file at the specified node for reading it on the # terminal. Otherwise, ask the user to create it. if [[ -f "$MANUAL_ENTRY" ]];then - /usr/bin/info --node="$(${FUNCNAM}_getNode "$MANUAL_ENTRY")" --file=${MANUAL_BASEFILE}.info.bz2 + /usr/bin/info --node="$(${MANUAL_BACKEND}_getNode "$MANUAL_ENTRY")" --file=${MANUAL_BASEFILE}.info.bz2 else - ${FUNCNAM}_editEntry + ${MANUAL_BACKEND}_editEntry fi done diff --git a/Scripts/Functions/Help/Texinfo/texinfo_updateMenu.sh b/Scripts/Functions/Help/Texinfo/texinfo_updateMenu.sh index c7591df..9c19336 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_updateMenu.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_updateMenu.sh @@ -36,7 +36,7 @@ function texinfo_updateMenu { # Build the menu node related to the entry being processed # currently. - local MENUNODE=$(${FUNCNAM}_getNode "$MANUAL_ENTRY") + local MENUNODE=$(${MANUAL_BACKEND}_getNode "$MANUAL_ENTRY") # Give format to menu line using texinfo style. local MENULINE="* ${MENUNODE}::" diff --git a/Scripts/Functions/Help/Texinfo/texinfo_updateNodes.sh b/Scripts/Functions/Help/Texinfo/texinfo_updateNodes.sh index 71c7520..5eee612 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_updateNodes.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_updateNodes.sh @@ -112,7 +112,7 @@ function texinfo_updateNodes { # Expand `See also' subsection translation markers in # documentation entry. - ${FUNCNAM}_makeSeeAlso "${MANUAL_BASEDIR}/$INCL" "$NODE" + ${MANUAL_BACKEND}_makeSeeAlso "${MANUAL_BASEDIR}/$INCL" "$NODE" fi diff --git a/Scripts/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh b/Scripts/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh index a602587..b8c71a1 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh @@ -33,12 +33,12 @@ function texinfo_updateOutputFiles { # paths incorrectly. pushd ${HOME}/artwork > /dev/null - ${FUNCNAM}_updateOutputFileInfo - ${FUNCNAM}_updateOutputFileXhtml - ${FUNCNAM}_updateOutputFileXml - ${FUNCNAM}_updateOutputFileDocbook - ${FUNCNAM}_updateOutputFilePdf - ${FUNCNAM}_updateOutputFilePlaintext + ${MANUAL_BACKEND}_updateOutputFileInfo + ${MANUAL_BACKEND}_updateOutputFileXhtml + ${MANUAL_BACKEND}_updateOutputFileXml + ${MANUAL_BACKEND}_updateOutputFileDocbook + ${MANUAL_BACKEND}_updateOutputFilePdf + ${MANUAL_BACKEND}_updateOutputFilePlaintext # Remove the working copy root directory from directory stack. popd > /dev/null