summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-13 09:45:39 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-13 09:45:39 +0000
commit8287ce5ba1683965d9e5eabaae687d1504d60e6a (patch)
treec1bf562a6bf9c0b05badf722e11e9edc459919bf /tools
parent3dc50b0d74ff0eb1ef92d41ffc21a1f948c50051 (diff)
downloadrockbox-8287ce5ba1683965d9e5eabaae687d1504d60e6a.tar.gz
rockbox-8287ce5ba1683965d9e5eabaae687d1504d60e6a.zip
Now the viewers.config concept works for players as well
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4869 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildzip.pl28
1 files changed, 17 insertions, 11 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index fa967b1b28..199034f1a2 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -26,20 +26,26 @@ sub buildzip {
mkdir ".rockbox/rocks", 0777;
`find . -name "*.rock" ! -empty | xargs --replace=foo cp foo .rockbox/rocks/`;
- if($notplayer) {
- `cp ../apps/plugins/sokoban.levels .rockbox/`; # sokoban levels
-
- open VIEWERS, "../apps/plugins/viewers.config" or
- die "can't open viewers.config";
- @viewers = <VIEWERS>;
- close VIEWERS;
- `cp ../apps/plugins/viewers.config .rockbox`;
- mkdir ".rockbox/viewers";
- for (@viewers) {
- if (/,(.+),/) {
+ open VIEWERS, "../apps/plugins/viewers.config" or
+ die "can't open viewers.config";
+ @viewers = <VIEWERS>;
+ close VIEWERS;
+
+ open VIEWERS, ">.rockbox/viewers.config" or
+ die "can't create .rockbox/viewers.config";
+ mkdir ".rockbox/viewers";
+ for (@viewers) {
+ if (/,(.+),/) {
+ if(-e ".rockbox/rocks/$1") {
`mv .rockbox/rocks/$1 .rockbox/viewers`;
+ print VIEWERS $_;
}
}
+ }
+ close VIEWERS;
+
+ if($notplayer) {
+ `cp ../apps/plugins/sokoban.levels .rockbox/`; # sokoban levels
mkdir ".rockbox/fonts", 0777;