6 print "Enter version number!\n";
10 if(!-f
"apps/version.h") {
11 print "run this script in the root dir\n";
15 @files=`find . -name FILES`;
21 my @p=split("/", $file);
22 $p[$#p]=""; # blank the last one
23 my $dir=join("/", @p);
25 $dir =~ s/^\.\///; # cut off ./ beginnings
27 $dir =~ s/\/$//; # off / trailers
35 my $dir=dirpart
($file);
43 push @entries, "$dir/$_";
56 my @parts = split("/", $dir);
75 #mkalldir("rockbox-1.0/firmware/malloc");
79 my $dir = dirpart
("rockbox-$version/$_");
80 #print "Create $dir\n";
82 #print "Copy $_ to $dir\n";
83 `cp -p $_ $dir 2>/dev/null`;
87 if(!open(VERSION
, "<apps/version.h")) {
88 print "Can't read version.h\n";
92 if(!open(THIS
, ">rockbox-$version/apps/version.h")) {
93 print "Can't create a new version.h for this version\n";
97 $_ =~ s/^\#define APPSVERSION .*/\#define APPSVERSION \"$version\"/;
103 `tar -cjf rockbox-$version.tar.bz2 rockbox-$version`;
104 `rm -rf rockbox-$version`;