| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function texinfo_copyEntrySection { |
| |
| |
| |
| if [[ ${MANUAL_SECT[((${MANUAL_DOCENTRY_ID} + 1))]} != '' ]];then |
| |
| |
| |
| |
| MANUAL_ENTRY_SRC=$(texinfo_getEntry ${MANUAL_SECT[${MANUAL_DOCENTRY_ID}]}) |
| MANUAL_ENTRY_DST=$(texinfo_getEntry ${MANUAL_SECT[((${MANUAL_DOCENTRY_ID} + 1))]}) |
| |
| elif [[ ${MANUAL_SECT[((${MANUAL_DOCENTRY_ID} + 1))]} == '' ]] \ |
| && [[ ${MANUAL_CHAP[((${MANUAL_DOCENTRY_ID} + 1))]} != '' ]];then |
| |
| |
| |
| |
| |
| |
| MANUAL_ENTRY_SRC=$(texinfo_getEntry ${MANUAL_SECT[${MANUAL_DOCENTRY_ID}]}) |
| MANUAL_ENTRY_DST=$(echo $MANUAL_ENTRY_SRC \ |
| | sed -r "s!${MANUAL_CHAP[${MANUAL_DOCENTRY_ID}]}!${MANUAL_CHAP[((${MANUAL_DOCENTRY_ID} + 1))]}!") |
| |
| else |
| cli_printMessage "`gettext "The location provided as target isn't valid."`" --as-error-line |
| fi |
| |
| # Print separator line along with action message. |
| cli_printMessage '-' --as-separator-line |
| cli_printMessage "${MANUAL_ENTRY_DST}" --as-creating-line |
| |
| # Verify entry source and target locations. |
| texinfo_checkEntrySrcDst "${MANUAL_ENTRY_SRC}" "${MANUAL_ENTRY_DST}" |
| |
| # Copy section entry from source to target using subversion. |
| svn cp "${MANUAL_ENTRY_SRC}" "${MANUAL_ENTRY_DST}" --quiet |
| |
| # Redefine chapter name using chapter name passed to |
| # `centos-art.sh' script as second non-option argument. |
| local MANUAL_CHAPTER_NAME=${MANUAL_CHAP[((${MANUAL_DOCENTRY_ID} + 1))]} |
| |
| |
| |
| |
| |
| |
| |
| |
| local MANUAL_CHAPTER_DIR=$(dirname ${MANUAL_ENTRY_DST}) |
| |
| |
| |
| |
| texinfo_updateStructureSection "${MANUAL_ENTRY_DST}" |
| |
| } |