From 9cf804448b24c207009411cab2f19cb244b1a913 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Wed, 30 Sep 2026 09:54:20 +0200 Subject: [PATCH] change checksum regex one line command --- src/albentohandy | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/albentohandy b/src/albentohandy index 4acc835..e08c442 100755 --- a/src/albentohandy +++ b/src/albentohandy @@ -119,14 +119,15 @@ cleanup_flac() calc_checksum() { + local regex= [ -n "$EXTENSIONS" ] \ || [ "${#EXTENSIONS[@]}" -ne 0 ] \ || EXTENSIONS=("ogg" "mp3" "opus" "flac") - regex=".*\(" - regex+=$(printf "\|\.%s" "${EXTENSIONS[@]}") - regex=${regex/\\\|/} - regex+="\)" + regex=$(printf "\|\.%s" "${EXTENSIONS[@]}" \ + | sed 's/\\|//' \ + | sed 's/^/.*\\(/' \ + | sed 's/$/\\)/') cd "$OUTPUT_PATH" || return $? find . -type f -regex "$regex" -print0 \ -- 2.47.3