diff --git a/Scripts/Bash/Functions/cli_getFilesList.sh b/Scripts/Bash/Functions/cli_getFilesList.sh index 1d76f03..679cec5 100755 --- a/Scripts/Bash/Functions/cli_getFilesList.sh +++ b/Scripts/Bash/Functions/cli_getFilesList.sh @@ -66,14 +66,7 @@ function cli_getFilesList { FILES=$LOCATION fi - # Check list of files to process. If we have an empty list of - # files, inform about it and stop script execution. Otherwise - # print list of files. - if [[ "$FILES" == '' ]];then - cli_printMessage "`gettext "There is no file to process."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' - else - echo "$FILES" - fi + # Output list of files to process. + echo "$FILES" } diff --git a/Scripts/Bash/Functions/cli_printActionPreamble.sh b/Scripts/Bash/Functions/cli_printActionPreamble.sh index 8360cfa..aade07a 100755 --- a/Scripts/Bash/Functions/cli_printActionPreamble.sh +++ b/Scripts/Bash/Functions/cli_printActionPreamble.sh @@ -38,6 +38,20 @@ function cli_printActionPreamble { local ACTION="$2" local FORMAT="$3" + # Check list of files to process. If we have an empty list of + # files, inform about it and stop script execution. Otherwise + # print list of files. + if [[ "$FILES" == '' ]];then + cli_printMessage "`gettext "There is no file to process."`" 'AsErrorLine' + cli_printMessage "$(caller)" 'AsToKnowMoreLine' + fi + + # Verify that all function parameters are passed. If they are not, + # there is nothing else to do here. + if [[ $# -ne 3 ]];then + return + fi + # Redefine total number of directories. COUNT=$(echo "$FILES" | sed -r "s! +!\n!g" | wc -l)