summaryrefslogtreecommitdiff
path: root/tools/buildzip.pl
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-08-06 13:42:52 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-08-06 13:42:52 +0000
commitfda7d720c05b4a756f045e0c0f4afe9630edb5c5 (patch)
tree35bb19611d47bcb05a49529a73ccc5d66a50476e /tools/buildzip.pl
parent5b76936a44de3c7ecd568300f26b5e6421901285 (diff)
Accept FS#5464 - organise the rocks directory.
If any plugins or "open with" optoins dont work please let me know... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14214 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/buildzip.pl')
-rwxr-xr-xtools/buildzip.pl26
1 files changed, 21 insertions, 5 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index c3f6ccc3d4..ea7aabee0b 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -213,6 +213,11 @@ sub buildzip {
mkdir ".rockbox/langs", 0777;
mkdir ".rockbox/rocks", 0777;
+ mkdir ".rockbox/rocks/games", 0777;
+ mkdir ".rockbox/rocks/apps", 0777;
+ mkdir ".rockbox/rocks/demos", 0777;
+ mkdir ".rockbox/rocks/viewers", 0777;
+
if ($recording) {
mkdir ".rockbox/recpresets", 0777;
}
@@ -280,7 +285,7 @@ STOP
open VIEWERS, ">.rockbox/viewers.config" or
die "can't create .rockbox/viewers.config";
- mkdir ".rockbox/viewers", 0777;
+
foreach my $line (@viewers) {
if ($line =~ /([^,]*),([^,]*),/) {
my ($ext, $plugin)=($1, $2);
@@ -305,7 +310,7 @@ STOP
if($dir ne "rocks") {
# target is not 'rocks' but the plugins are always in that
# dir at first!
- `mv .rockbox/rocks/$name .rockbox/$r`;
+ `mv .rockbox/rocks/$name .rockbox/rocks/$r`;
}
print VIEWERS $line;
}
@@ -318,11 +323,22 @@ STOP
if(-e ".rockbox/rocks/$oname") {
# if there's an "overlay" file for the .rock, move that as
# well
- `mv .rockbox/rocks/$oname .rockbox/$dir`;
+ `mv .rockbox/rocks/$oname .rockbox/rocks/$dir`;
}
}
}
close VIEWERS;
+
+ open CATEGORIES, "$ROOT/apps/plugins/CATEGORIES" or
+ die "can't open CATEGORIES";
+ @rock_targetdirs = <CATEGORIES>;
+ close CATEGORIES;
+ foreach my $line (@rock_targetdirs) {
+ if ($line =~ /([^,]*),(.*)/) {
+ my ($plugin, $dir)=($1, $2);
+ `mv .rockbox/rocks/${plugin}.rock .rockbox/rocks/$dir 2> /dev/null`;
+ }
+ }
if ($bitmap) {
mkdir ".rockbox/icons", 0777;
@@ -335,8 +351,8 @@ STOP
`cp $ROOT/apps/tagnavi.config .rockbox/`;
if($bitmap) {
- `cp $ROOT/apps/plugins/sokoban.levels .rockbox/rocks/`; # sokoban levels
- `cp $ROOT/apps/plugins/snake2.levels .rockbox/rocks/`; # snake2 levels
+ `cp $ROOT/apps/plugins/sokoban.levels .rockbox/rocks/games/`; # sokoban levels
+ `cp $ROOT/apps/plugins/snake2.levels .rockbox/rocks/games/`; # snake2 levels
}
if($image) {