From 759d18559f349752285144f6bfe0562997e98660 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Mar 01 2011 19:22:52 +0000 Subject: Update manual functionality: - Update manual base directory. Start using trunk/Manual/. - Remove MANUAL_DIR. Use MANUAL_BASEDIR instead. There is just one manual so there is no need to determine which manual-specific directory we are working with. It is already set in MANUAL_BASEDIR variable, so use this variable to reflect the base directory repository documentation is stored in. --- diff --git a/Scripts/Bash/Cli/Functions/Manual/manual.sh b/Scripts/Bash/Cli/Functions/Manual/manual.sh index ff211a9..e2d82e7 100755 --- a/Scripts/Bash/Cli/Functions/Manual/manual.sh +++ b/Scripts/Bash/Cli/Functions/Manual/manual.sh @@ -30,7 +30,7 @@ function manual { # Define manuals base directory. This is the place where # documentation manuals base directory structures are stored and # organized in. - MANUAL_BASEDIR="${HOME}/artwork/trunk/Manuals" + MANUAL_BASEDIR="${HOME}/artwork/trunk/Manual" # Define default value to target flag. The target flag (--to) # controls final destination used by copy related actions. diff --git a/Scripts/Bash/Cli/Functions/Manual/manual_deleteCrossReferences.sh b/Scripts/Bash/Cli/Functions/Manual/manual_deleteCrossReferences.sh index 284106d..4bfe876 100755 --- a/Scripts/Bash/Cli/Functions/Manual/manual_deleteCrossReferences.sh +++ b/Scripts/Bash/Cli/Functions/Manual/manual_deleteCrossReferences.sh @@ -69,7 +69,7 @@ function manual_deleteCrossReferences { REPLACE[1]='@comment --- '`gettext "Removed"`'(\1) ---' # Define list of entries to process. - local ENTRIES=$(cli_getFilesList "${MANUAL_DIR}" '.*\.texi') + local ENTRIES=$(cli_getFilesList "${MANUAL_BASEDIR}" '.*\.texi') # Set action preamble. cli_printActionPreamble "$ENTRIES" diff --git a/Scripts/Bash/Cli/Functions/Manual/manual_getActions.sh b/Scripts/Bash/Cli/Functions/Manual/manual_getActions.sh index 6a2dabf..4d3a628 100755 --- a/Scripts/Bash/Cli/Functions/Manual/manual_getActions.sh +++ b/Scripts/Bash/Cli/Functions/Manual/manual_getActions.sh @@ -110,13 +110,9 @@ function manual_getActions { # Define documentation entry file (without extension). ENTRY_FILE=$(basename ${ENTRY} | sed -r 's!\.texi$!!') - # Define directory for documentation manual. This is the place the - # specific documentation manual we are working with is stored in. - MANUAL_DIR=$(echo $ENTRY | cut -d / -f-7) - # Define file name for documentation manual. This is the file used # to initiate the structure of documentation manual. - MANUAL_NAME=$(cli_getRepoName ${MANUAL_DIR} 'f') + MANUAL_NAME=repository # Define directory to store documentation entries. At this point, # we need to take a desition about documentation design, in order @@ -125,12 +121,12 @@ function manual_getActions { # and also, how such design could be adapted to changes in the # repository structure? # - # One solution would be: represent the repository's first level - # structure in three chapters only (i.e., trunk, branches, and - # tags) and handle everything else inside them as sections. Sub - # and subsub section will not have their own files, they will be - # written inside section files instead. - MANUAL_CHAPTER_DIR=$(echo $ENTRY | cut -d / -f-8) + # One solution would be: represent the repository's directory + # structure as sections inside a chapter named Filesystem or + # something similar. Subsections and subsubsections will not have + # their own files, they all will be written inside the same + # section file that represents the repository directory. + MANUAL_CHAPTER_DIR=$(echo $ENTRY | cut -d / -f-7) # Define chapter name for the documentation entry we are working # with. @@ -139,14 +135,14 @@ function manual_getActions { # Define base name for documentation manual files (without # extension). This is the main file name used to build texinfo # related files (.info, .pdf, .xml, etc.). - MANUAL_BASEFILE=$(cli_getFilesList "${MANUAL_DIR}" ".*${MANUAL_NAME}\.texi" | sed 's!\.texi$!!' ) + MANUAL_BASEFILE="${MANUAL_BASEDIR}/${MANUAL_NAME}" # Set action preable. cli_printActionPreamble "${MANUAL_BASEFILE}.texi" # Syncronize changes between the working copy and the central # repository to bring down changes. - cli_syncroRepoChanges ${MANUAL_DIR} + cli_syncroRepoChanges ${MANUAL_BASEDIR} # Execute action name. if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then @@ -158,6 +154,6 @@ function manual_getActions { # Syncronize changes between the working copy and the central # repository to commit up changes. - cli_commitRepoChanges ${MANUAL_DIR} + cli_commitRepoChanges ${MANUAL_BASEDIR} } diff --git a/Scripts/Bash/Cli/Functions/Manual/manual_getEntry.sh b/Scripts/Bash/Cli/Functions/Manual/manual_getEntry.sh index f974b32..a8d932c 100755 --- a/Scripts/Bash/Cli/Functions/Manual/manual_getEntry.sh +++ b/Scripts/Bash/Cli/Functions/Manual/manual_getEntry.sh @@ -54,10 +54,10 @@ function manual_getEntry { # to take place on. Other options like `--edit', `--delete' and # `--read' cannot be applied to paths provided is inside # trunk/Manuals/ such actions made manually. - if [[ ${ENTRY} =~ '^trunk/Manuals/.+$' ]];then - ENTRY=$(echo ${ENTRY} | sed 's!trunk/Manuals/!!') + if [[ ${ENTRY} =~ '^trunk/Manual' ]];then + ENTRY=$(echo ${ENTRY} | sed 's!trunk/Manual/!!') else - ENTRY=$(dirname Repository/${ENTRY})/$(basename $LOCATION).texi + ENTRY=$(dirname Filesystem/${ENTRY})/$(basename $LOCATION).texi fi # Re-define entry to set absolute path to manuals base directory diff --git a/Scripts/Bash/Cli/Functions/Manual/manual_renameCrossReferences.sh b/Scripts/Bash/Cli/Functions/Manual/manual_renameCrossReferences.sh index 4d701fe..9277e30 100755 --- a/Scripts/Bash/Cli/Functions/Manual/manual_renameCrossReferences.sh +++ b/Scripts/Bash/Cli/Functions/Manual/manual_renameCrossReferences.sh @@ -64,7 +64,7 @@ function manual_renameCrossReferences { NODE_DST=$(echo $NODE_DST | sed -r 's!\\[[:digit:]]$!!') # Define list of entries to process. - ENTRIES=$(cli_getFilesList "${MANUAL_DIR}" '.*\.texi') + ENTRIES=$(cli_getFilesList "${MANUAL_BASEDIR}" '.*\.texi') # Set action preamble. cli_printActionPreamble "$ENTRIES" diff --git a/Scripts/Bash/Cli/Functions/Manual/manual_restoreCrossReferences.sh b/Scripts/Bash/Cli/Functions/Manual/manual_restoreCrossReferences.sh index 4ec5978..60a1105 100755 --- a/Scripts/Bash/Cli/Functions/Manual/manual_restoreCrossReferences.sh +++ b/Scripts/Bash/Cli/Functions/Manual/manual_restoreCrossReferences.sh @@ -66,7 +66,7 @@ function manual_restoreCrossReferences { REPLACE[1]='\1' # Define list of entries to process. - local ENTRIES=$(cli_getFilesList "${MANUAL_DIR}" '.*\.texi') + local ENTRIES=$(cli_getFilesList "${MANUAL_BASEDIR}" '.*\.texi') # Set action preamble. cli_printActionPreamble "$ENTRIES" diff --git a/Scripts/Bash/Cli/Functions/Manual/manual_updateNodes.sh b/Scripts/Bash/Cli/Functions/Manual/manual_updateNodes.sh index 8f91dd8..ddbf14e 100755 --- a/Scripts/Bash/Cli/Functions/Manual/manual_updateNodes.sh +++ b/Scripts/Bash/Cli/Functions/Manual/manual_updateNodes.sh @@ -40,13 +40,13 @@ function manual_updateNodes { CIND=$(echo "$NODE") # Create an empty directory to store texinfo files. - if [[ ! -d ${MANUAL_DIR}/$(dirname "$INCL") ]];then - mkdir -p ${MANUAL_DIR}/$(dirname "$INCL") + if [[ ! -d ${MANUAL_BASEDIR}/$(dirname "$INCL") ]];then + mkdir -p ${MANUAL_BASEDIR}/$(dirname "$INCL") fi # Create texinfo section file using its template. - if [[ ! -f ${MANUAL_DIR}/$INCL ]];then - cp ${FUNCCONFIG}/manual-section.texi ${MANUAL_DIR}/$INCL + if [[ ! -f ${MANUAL_BASEDIR}/$INCL ]];then + cp ${FUNCCONFIG}/manual-section.texi ${MANUAL_BASEDIR}/$INCL fi # Output node information based on texinfo menu.