Exclude File check is if file is >0 and fix wrong check for tmp file
Exclude file was only checked if it exists, even if it was empty it would start processing. In the exclude check there was also a wrong check for the tmp exclude file, it actually checked if the main exclude file was >0 instead of the tmp file.
This commit is contained in:
@@ -92,8 +92,8 @@ while read include_folder; do
|
||||
fi;
|
||||
done<"${BASE_FOLDER}${INCLUDE_FILE}";
|
||||
|
||||
# exclude list
|
||||
if [ -f "${BASE_FOLDER}${EXCLUDE_FILE}" ]; then
|
||||
# exclude list, only if file exists and is larger than zero
|
||||
if [ -s "${BASE_FOLDER}${EXCLUDE_FILE}" ]; then
|
||||
printf "${PRINTF_SUB_BLOCK}" "EXCLUDE" "$(date +'%F %T')" "${MODULE}";
|
||||
# check that the folders in that exclude file are actually valid,
|
||||
# remove non valid ones and warn
|
||||
@@ -147,7 +147,7 @@ if [ -f "${BASE_FOLDER}${EXCLUDE_FILE}" ]; then
|
||||
fi;
|
||||
done<"${BASE_FOLDER}${EXCLUDE_FILE}";
|
||||
# avoid blank file add by checking if the tmp file has a size >0
|
||||
if [ -s "${BASE_FOLDER}${EXCLUDE_FILE}" ]; then
|
||||
if [ -s "${TMP_EXCLUDE_FILE}" ]; then
|
||||
OPT_EXCLUDE="--exclude-from=${TMP_EXCLUDE_FILE}";
|
||||
fi;
|
||||
fi;
|
||||
|
||||
Reference in New Issue
Block a user