Merge pull request #789 from reyemxela/compression_fixes

Fix validate_for_chd and unquoted log line
This commit is contained in:
icenine451 2024-05-21 11:25:39 -04:00 committed by GitHub
commit bbe3b01f39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -66,7 +66,7 @@ validate_for_chd() {
log i "Validating .cue associated .bin files" log i "Validating .cue associated .bin files"
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
log i "Associated bin files read:" log i "Associated bin files read:"
log i $(printf '%s\n' "$cue_bin_files") log i "$(printf '%s\n' "$cue_bin_files")"
if [[ ! -z "$cue_bin_files" ]]; then if [[ ! -z "$cue_bin_files" ]]; then
while IFS= read -r line while IFS= read -r line
do do

View file

@ -86,11 +86,11 @@ log() {
esac esac
# Display the message in the terminal # Display the message in the terminal
echo -e "$colored_message" echo -e "$colored_message" >&2
# Write the log message to the log file # Write the log message to the log file
if [ ! -f "$logfile" ]; then if [ ! -f "$logfile" ]; then
echo "$timestamp [WARN] Log file not found in \"$logfile\", creating it" echo "$timestamp [WARN] Log file not found in \"$logfile\", creating it" >&2
touch "$logfile" touch "$logfile"
fi fi
echo "$log_message" >> "$logfile" echo "$log_message" >> "$logfile"