6 print "Enter version number!\n";
10 if(!-f
"apps/version.h") {
11 print "run this script in the root dir\n";
14 # save the complete version string for VERSION file,
15 # strip everything after space / hyphen for filename
16 $longversion = $ARGV[0];
17 $version =~ s/[ -].+//;
19 # -L allows find to follow symbolic links
20 @files=`find -L . -name FILES`;
26 my @p=split("/", $file);
27 $p[$#p]=""; # blank the last one
28 my $dir=join("/", @p);
30 $dir =~ s/^\.\///; # cut off ./ beginnings
32 $dir =~ s/\/$//; # off / trailers
40 my $dir=dirpart
($file);
48 push @entries, "$dir/$_";
61 my @parts = split("/", $dir);
80 #mkalldir("rockbox-1.0/firmware/malloc");
84 my $dir = dirpart
("rockbox-$version/$_");
85 #print "Create $dir\n";
87 #print "Copy $_ to $dir\n";
88 `cp -p $_ $dir 2>/dev/null`;
91 if(!open(VERSION
, "<apps/version.h")) {
92 print "Can't read version.h\n";
96 if(!open(THIS
, ">rockbox-$version/apps/version.h")) {
97 print "Can't create a new version.h for this version\n";
101 $_ =~ s/^\#define APPSVERSION .*/\#define APPSVERSION \"$version\"/;
107 if(!open(VER
, ">rockbox-$version/docs/VERSION")) {
108 print "Can't create new docs/VERSION file\n";
114 `tar -cjf rockbox-$version.tar.bz2 rockbox-$version`;
115 `rm -rf rockbox-$version`;