| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function texinfo_checkEntrySrcDst { |
| |
| |
| local MANUAL_ENTRY_SRC="$1" |
| |
| |
| local MANUAL_ENTRY_DST="$2" |
| |
| |
| if [[ ! -a ${MANUAL_ENTRY_SRC} ]];then |
| cli_printMessage "`gettext "The source location doesn't exist."`" --as-error-line |
| fi |
| |
| # Verify source and target locations to be sure they are different |
| # one another. We cannot copy a source location to itself. |
| if [[ $MANUAL_ENTRY_SRC == $MANUAL_ENTRY_DST ]];then |
| cli_printMessage "`gettext "The source and target locations cannot be the same."`" --as-error-line |
| fi |
| |
| # Verify source location to be sure it is under version control |
| # and there isn't pending change to be committed first. |
| if [[ $(svn_isVersioned ${MANUAL_ENTRY_SRC}) == 'true' ]];then |
| if [[ $(cli_getRepoStatus ${MANUAL_ENTRY_SRC}) != '' ]];then |
| cli_printMessage "`gettext "The source location has pending changes."`" --as-error-line |
| fi |
| else |
| cli_printMessage "`gettext "The source location isn't under version control."`" --as-error-line |
| fi |
| |
| # Verify target directory where the source will be duplicated in. |
| # The target directory must exist before copying the source |
| # location into it. If it doesn't exist, use subversion to create |
| |
| if [[ ! -d $(dirname ${MANUAL_ENTRY_DST}) ]];then |
| svn mkdir $(dirname ${MANUAL_ENTRY_DST}) --quiet |
| fi |
| |
| |
| if [[ -a ${MANUAL_ENTRY_DST} ]];then |
| cli_printMessage "`gettext "The target location already exists."`" --as-error-line |
| fi |
| |
| } |