From db44b294f49ab5705c5254d7a202d79dd342aa59 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 4 Mar 2005 08:19:56 +0000 Subject: support .ovl files to "accompany" .rock files when they are viewers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6128 a1c6a512-1295-4272-9138-f99709370657 --- tools/buildzip.pl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/buildzip.pl b/tools/buildzip.pl index 9b08b61c2a..e3c013631b 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -58,16 +58,23 @@ sub buildzip { die "can't create .rockbox/viewers.config"; mkdir ".rockbox/viewers", 0777; for (@viewers) { - if (/,(.+),/) { - if(-e ".rockbox/rocks/$1") { - `mv .rockbox/rocks/$1 .rockbox/viewers`; + if (/,(.+).rock,/) { + my $r = "$1.rock"; + my $o = "$1.ovl"; + if(-e ".rockbox/rocks/$r") { + `mv .rockbox/rocks/$r .rockbox/viewers`; print VIEWERS $_; } - elsif(-e ".rockbox/viewers/$1") { + elsif(-e ".rockbox/viewers/$r") { # in case the same plugin works for multiple extensions, it # was already moved to the viewers dir print VIEWERS $_; } + if(-e ".rockbox/rocks/$o") { + # if there's an "overlay" file for the .rock, move that as + # well + `mv .rockbox/rocks/$o .rockbox/viewers`; + } } } close VIEWERS; -- cgit v1.2.3