From c1853cd60414461ebfecf58fb922e4a3e7e6aee5 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jan 06 2011 17:47:54 +0000 Subject: Update `path' functionality: - Remove duplicated verification of FLAG_TO and ACTIONVAL variables. Such verification is already done by cli_checkRepoDirTarget and cli_checkRepoDirSource, respectively. --- diff --git a/Scripts/Bash/Functions/Path/path_doCopy.sh b/Scripts/Bash/Functions/Path/path_doCopy.sh index 0e2574d..368b93b 100755 --- a/Scripts/Bash/Functions/Path/path_doCopy.sh +++ b/Scripts/Bash/Functions/Path/path_doCopy.sh @@ -26,11 +26,8 @@ function path_doCopy { - # Verify target variable. We can't continue if target is empty. - if [[ $FLAG_TO == '' ]];then - cli_printMessage "`gettext "There is no target to work with."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' - fi + # Verify target directory. + cli_checkRepoDirTarget # Print action preamble. cli_printActionPreamble "${FLAG_TO}" 'doCreate' 'AsResponseLine' diff --git a/Scripts/Bash/Functions/Path/path_doDelete.sh b/Scripts/Bash/Functions/Path/path_doDelete.sh index 8b62533..6105d75 100755 --- a/Scripts/Bash/Functions/Path/path_doDelete.sh +++ b/Scripts/Bash/Functions/Path/path_doDelete.sh @@ -26,13 +26,8 @@ function path_doDelete { - local PDIR - - # Verify target variable. We can't continue if target is empty. - if [[ $ACTIONVAL == '' ]];then - cli_printMessage "`gettext "There is no source to work with."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' - fi + # Verify target directory. + cli_checkRepoDirTarget # Print action preamble. cli_printActionPreamble "$ACTIONVAL" 'doDelete' 'AsResponseLine' diff --git a/Scripts/Bash/Functions/Path/path_getActions.sh b/Scripts/Bash/Functions/Path/path_getActions.sh index 634f002..0e9edf3 100755 --- a/Scripts/Bash/Functions/Path/path_getActions.sh +++ b/Scripts/Bash/Functions/Path/path_getActions.sh @@ -112,11 +112,6 @@ function path_getActions { esac done - # Verify action value variable. - if [[ $ACTIONVAL == '' ]];then - cli_printMessage "$(caller)" 'AsToKnowMoreLine' - fi - # Check action value (ACTIONVAL) passed through the command-line # using source directory definition as reference. cli_checkRepoDirSource