From fd53cf5039620d162cddb7fdeddfdb1b7dffaa35 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jan 06 2011 16:30:03 +0000 Subject: Update cli_checkRepoDirTarget.sh. --- diff --git a/Scripts/Bash/Functions/cli_checkRepoDirTarget.sh b/Scripts/Bash/Functions/cli_checkRepoDirTarget.sh index 2dac248..1408ca1 100755 --- a/Scripts/Bash/Functions/cli_checkRepoDirTarget.sh +++ b/Scripts/Bash/Functions/cli_checkRepoDirTarget.sh @@ -27,12 +27,13 @@ function cli_checkRepoDirTarget { # Check target value before making an absolute path from it. - if [[ $FLAG_TO =~ '(\.\.(/)?)' ]];then - cli_printMessage "`gettext "The path provided can't be processed."`" 'AsErrorLine' + if [[ $FLAG_TO == '' ]];then + cli_printMessage "`gettext "There is no destination to work with."`" 'AsErrorLine' cli_printMessage "$(caller)" "AsToKnowMoreLine" fi - if [[ ! $FLAG_TO =~ '^[A-Za-z0-9\.:/-]+$' ]];then - cli_printMessage "`gettext "The path provided can't be processed."`" 'AsErrorLine' + if [[ $FLAG_TO =~ '(\.\.(/)?)' ]] \ + || [[ ! $FLAG_TO =~ '^[A-Za-z0-9\.:/-]+$' ]];then + cli_printMessage "`eval_gettext "The value \\\`\\\$FLAG_TO' is not valid destination value."`" 'AsErrorLine' cli_printMessage "$(caller)" "AsToKnowMoreLine" fi