| #!/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. |
| cli_checkFiles ${MANUAL_ENTRY_SRC} --is-versioned |
| if [[ $(cli_runFnEnvironment vcs --status ${MANUAL_ENTRY_SRC}) != '' ]];then |
| cli_printMessage "`gettext "The source location has pending changes."`" --as-error-line |
| fi |
| |
| |
| |
| |
| |
| if [[ ! -d $(dirname ${MANUAL_ENTRY_DST}) ]];then |
| cli_runFnEnvironment vcs --mkdir $(dirname ${MANUAL_ENTRY_DST}) |
| fi |
| |
| |
| if [[ -a ${MANUAL_ENTRY_DST} ]];then |
| cli_printMessage "`gettext "The target location already exists."`" --as-error-line |
| fi |
| |
| } |