[med_integrity] Fixed fileList generation

This commit is contained in:
ayakael 2018-12-27 22:23:50 -05:00
parent aa07cc1da8
commit c8ff189143
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -13,12 +13,14 @@
# }
med_integrity() {
local FILE="${1}"
local fileList=(${@})
for file in ${fileList[@]}; do
flac -wst "${file}" >${STDERR} 2>&1
local EXIT=$?
[[ $? -eq 0 ]] || { echo "[>>>>>>] Error reported"; cat ${STDERR}; local ERR=true; }
done
echo >${STDERR}
[[ "${ERR}" == "true" ]] && { _msg EXEC "Integrity check completed with errors"; _msg WARN; return 1; } || { _msg EXEC "Integrity check completed succesfully"; _msg OK; return 0; }
}