diff --git a/tools/release b/tools/release index 27c2c58ac2..bd107c6a0e 100755 --- a/tools/release +++ b/tools/release @@ -7,6 +7,11 @@ if($version eq "") { exit; } +if(!-f "apps/version.h") { + print "run this script in the root dir\n"; + exit; +} + @files=`find . -name FILES`; my @entries; @@ -31,6 +36,9 @@ sub add { open(FILE, "<$file"); while() { + if($_ =~ /^ *\#/) { + next; + } chomp; push @entries, "$dir/$_"; } @@ -75,6 +83,23 @@ for(@entries) { `cp -p $_ $dir`; } + +if(!open(VERSION, "rockbox-$version/apps/version.h")) { + print "Can't create a new version.h for this version\n"; + exit; +} +while() { + $_ =~ s/^\#define APPSVERSION .*/\#define APPSVERSION \"$version\"/; + print THIS $_; +} +close(VERSION); +close(THIS); + `tar -cf rockbox-$version.tar rockbox-$version`; `gzip -9 rockbox-$version.tar`; `rm -rf rockbox-$version`;