find allow to use pattern to verify if file exists

This commit is contained in:
Jeremy Gardais 2020-07-06 15:30:32 +02:00
parent df39d103e6
commit 47d7060743
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 1 deletions

View File

@ -230,7 +230,8 @@ is_file_present() { # {{{
return_is_file_present="1" return_is_file_present="1"
### Check if the file exists ### Check if the file exists
if [ -f "${local_file_path}" ]; then # shellcheck disable=SC2086
if find ${local_file_path} > /dev/null 2>&1; then
return_is_file_present="0" return_is_file_present="0"
debug_message "is_file_present \ debug_message "is_file_present \
The file ${RED}${local_file_path}${COLOR_DEBUG} exists." The file ${RED}${local_file_path}${COLOR_DEBUG} exists."