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
This commit is contained in:
Daniel Stenberg 2005-03-04 08:19:56 +00:00
parent f9e18aefac
commit db44b294f4

View file

@ -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;