diff options
| -rwxr-xr-x | tools/buildzip.pl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl index 9b08b61..e3c0136 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; |