summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-29 12:56:35 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-29 12:56:35 +0000
commitbdf24904c90ceeb71a01a4529ce635cbe61a4543 (patch)
treef4d5bc7bd555c3900a46f8c485526f961ca935d2 /tools
parent7bf7914811cd243892cbac50d9d0287bd53426de (diff)
downloadrockbox-bdf24904c90ceeb71a01a4529ce635cbe61a4543.zip
rockbox-bdf24904c90ceeb71a01a4529ce635cbe61a4543.tar.gz
rockbox-bdf24904c90ceeb71a01a4529ce635cbe61a4543.tar.bz2
rockbox-bdf24904c90ceeb71a01a4529ce635cbe61a4543.tar.xz
allow commented lines in FILES
generate the apps/version.h version define properly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@793 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/release25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/release b/tools/release
index 27c2c58..bd107c6 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(<FILE>) {
+ if($_ =~ /^ *\#/) {
+ next;
+ }
chomp;
push @entries, "$dir/$_";
}
@@ -75,6 +83,23 @@ for(@entries) {
`cp -p $_ $dir`;
}
+
+if(!open(VERSION, "<apps/version.h")) {
+ print "Can't read version.h\n";
+ exit;
+}
+
+if(!open(THIS, ">rockbox-$version/apps/version.h")) {
+ print "Can't create a new version.h for this version\n";
+ exit;
+}
+while(<VERSION>) {
+ $_ =~ 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`;