From 6bb6c20479c81036496501ec98ce1404202c60f6 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 7 May 2024 15:16:29 -0400 Subject: voice: Don't generate talkclips for directories with 'talkclip.ignore' Add one of these to the .rockbox directory Change-Id: Ibc9733ba31d1b2c49b69ab833d284faa84f5cedd --- tools/voice.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/voice.pl') diff --git a/tools/voice.pl b/tools/voice.pl index 2c966cb0df..9efc844c10 100755 --- a/tools/voice.pl +++ b/tools/voice.pl @@ -582,13 +582,13 @@ sub gentalkclips { if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) { next; } - # Element is a dir - if ( -d $path) { + + if ( -d $path) { # Element is a dir $enc = sprintf("%s/_dirname.talk", $path); - gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i); - } - # Element is a file - else { + if (! -e "$path/talkclips.ignore") { # Skip directories containing "talkclips.ignore" + gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i); + } + } else { # Element is a file $enc = sprintf("%s.talk", $path); $voice =~ s/\.[^\.]*$//; # Trim extension } -- cgit v1.2.3