summaryrefslogtreecommitdiff
path: root/tools
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
parent5b76936a44de3c7ecd568300f26b5e6421901285 (diff)
downloadrockbox-fda7d720c05b4a756f045e0c0f4afe9630edb5c5.tar.gz
rockbox-fda7d720c05b4a756f045e0c0f4afe9630edb5c5.zip
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')
-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 {
213 213
214 mkdir ".rockbox/langs", 0777; 214 mkdir ".rockbox/langs", 0777;
215 mkdir ".rockbox/rocks", 0777; 215 mkdir ".rockbox/rocks", 0777;
216 mkdir ".rockbox/rocks/games", 0777;
217 mkdir ".rockbox/rocks/apps", 0777;
218 mkdir ".rockbox/rocks/demos", 0777;
219 mkdir ".rockbox/rocks/viewers", 0777;
220
216 if ($recording) { 221 if ($recording) {
217 mkdir ".rockbox/recpresets", 0777; 222 mkdir ".rockbox/recpresets", 0777;
218 } 223 }
@@ -280,7 +285,7 @@ STOP
280 285
281 open VIEWERS, ">.rockbox/viewers.config" or 286 open VIEWERS, ">.rockbox/viewers.config" or
282 die "can't create .rockbox/viewers.config"; 287 die "can't create .rockbox/viewers.config";
283 mkdir ".rockbox/viewers", 0777; 288
284 foreach my $line (@viewers) { 289 foreach my $line (@viewers) {
285 if ($line =~ /([^,]*),([^,]*),/) { 290 if ($line =~ /([^,]*),([^,]*),/) {
286 my ($ext, $plugin)=($1, $2); 291 my ($ext, $plugin)=($1, $2);
@@ -305,7 +310,7 @@ STOP
305 if($dir ne "rocks") { 310 if($dir ne "rocks") {
306 # target is not 'rocks' but the plugins are always in that 311 # target is not 'rocks' but the plugins are always in that
307 # dir at first! 312 # dir at first!
308 `mv .rockbox/rocks/$name .rockbox/$r`; 313 `mv .rockbox/rocks/$name .rockbox/rocks/$r`;
309 } 314 }
310 print VIEWERS $line; 315 print VIEWERS $line;
311 } 316 }
@@ -318,11 +323,22 @@ STOP
318 if(-e ".rockbox/rocks/$oname") { 323 if(-e ".rockbox/rocks/$oname") {
319 # if there's an "overlay" file for the .rock, move that as 324 # if there's an "overlay" file for the .rock, move that as
320 # well 325 # well
321 `mv .rockbox/rocks/$oname .rockbox/$dir`; 326 `mv .rockbox/rocks/$oname .rockbox/rocks/$dir`;
322 } 327 }
323 } 328 }
324 } 329 }
325 close VIEWERS; 330 close VIEWERS;
331
332 open CATEGORIES, "$ROOT/apps/plugins/CATEGORIES" or
333 die "can't open CATEGORIES";
334 @rock_targetdirs = <CATEGORIES>;
335 close CATEGORIES;
336 foreach my $line (@rock_targetdirs) {
337 if ($line =~ /([^,]*),(.*)/) {
338 my ($plugin, $dir)=($1, $2);
339 `mv .rockbox/rocks/${plugin}.rock .rockbox/rocks/$dir 2> /dev/null`;
340 }
341 }
326 342
327 if ($bitmap) { 343 if ($bitmap) {
328 mkdir ".rockbox/icons", 0777; 344 mkdir ".rockbox/icons", 0777;
@@ -335,8 +351,8 @@ STOP
335 `cp $ROOT/apps/tagnavi.config .rockbox/`; 351 `cp $ROOT/apps/tagnavi.config .rockbox/`;
336 352
337 if($bitmap) { 353 if($bitmap) {
338 `cp $ROOT/apps/plugins/sokoban.levels .rockbox/rocks/`; # sokoban levels 354 `cp $ROOT/apps/plugins/sokoban.levels .rockbox/rocks/games/`; # sokoban levels
339 `cp $ROOT/apps/plugins/snake2.levels .rockbox/rocks/`; # snake2 levels 355 `cp $ROOT/apps/plugins/snake2.levels .rockbox/rocks/games/`; # snake2 levels
340 } 356 }
341 357
342 if($image) { 358 if($image) {