From 5c73a8523fa4b7640428a2713b9bec1c3bace810 Mon Sep 17 00:00:00 2001 From: Luke Tidd Date: Sat, 18 Nov 2023 14:58:57 -0500 Subject: [PATCH] [encode_all] clean up --- encode_all | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/encode_all b/encode_all index 7f490ed..789c6b9 100755 --- a/encode_all +++ b/encode_all @@ -148,12 +148,15 @@ function encode() { fi } -echo going to process +echo starting processing find "$src_library" -type f -name '*.flac' -print0 | env_parallel -P 0 -0 --bar encode {} echo done processing +echo removing obsolete opus files diff -d --suppress-common-lines <(cat "$temp_dir"/* | sort -V) <(find "$output_dir" -type f | sort -V) | grep -E '^>' | sed 's/^> //' | while read old_opus; do rm -f "$old_opus" done +rm -rf "$temp_dir" +echo deleting any empty directories find "$output_dir" -empty -type d -delete