diff --git a/Scripts/Bash/Functions/cli_checkFiles.sh b/Scripts/Bash/Functions/cli_checkFiles.sh index e535111..1e99667 100644 --- a/Scripts/Bash/Functions/cli_checkFiles.sh +++ b/Scripts/Bash/Functions/cli_checkFiles.sh @@ -49,11 +49,8 @@ function cli_checkFiles { fi # Check value passed as file to cli_checkFiles function. The file - # value cannot be empty. - if [[ $FILE == '' ]];then - cli_printMessage "cli_checkFiles: `gettext "The first argument cannot be empty."`" 'AsErrorLine' - cli_printMessage "$(caller)" "AsToKnowMoreLine" - fi + # value cannot be empty nor have extrange values. + cli_checkPathComponent "$FILE" '--default' # Perform file verification using FILE and TYPE variables. case $TYPE in diff --git a/Scripts/Bash/Functions/cli_checkRepoDirSource.sh b/Scripts/Bash/Functions/cli_checkRepoDirSource.sh index 9f3fde1..af358f7 100755 --- a/Scripts/Bash/Functions/cli_checkRepoDirSource.sh +++ b/Scripts/Bash/Functions/cli_checkRepoDirSource.sh @@ -27,12 +27,7 @@ function cli_checkRepoDirSource { # Check source value before making an absolute path from it. - if [[ $ACTIONVAL == '' ]] \ - || [[ $ACTIONVAL =~ '(\.\.(/)?)' ]] \ - || [[ ! $ACTIONVAL =~ '^[A-Za-z0-9\.:/-]+$' ]];then - cli_printMessage "`eval_gettext "The value \\\`\\\$ACTIONVAL' is not valid."`" 'AsErrorLine' - cli_printMessage "$(caller)" "AsToKnowMoreLine" - fi + cli_checkPathComponents "$ACTIONVAL" '--default' # Redefine source value to build repository absolute path from # repository top level on. As we are removing diff --git a/Scripts/Bash/Functions/cli_checkRepoDirTarget.sh b/Scripts/Bash/Functions/cli_checkRepoDirTarget.sh index 3184c8a..01b4d75 100755 --- a/Scripts/Bash/Functions/cli_checkRepoDirTarget.sh +++ b/Scripts/Bash/Functions/cli_checkRepoDirTarget.sh @@ -27,15 +27,7 @@ function cli_checkRepoDirTarget { # Check target value before making an absolute path from it. - if [[ $FLAG_TO == '' ]];then - cli_printMessage "`gettext "There is no destination to work with."`" 'AsErrorLine' - cli_printMessage "$(caller)" "AsToKnowMoreLine" - fi - 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 + cli_checkPathComponent "$FLAG_TO" '--default' # Redefine target value to build repository absolute path from # repository top level on. As we are removing