diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-29 12:56:35 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-29 12:56:35 +0000 |
commit | bdf24904c90ceeb71a01a4529ce635cbe61a4543 (patch) | |
tree | f4d5bc7bd555c3900a46f8c485526f961ca935d2 | |
parent | 7bf7914811cd243892cbac50d9d0287bd53426de (diff) | |
download | rockbox-bdf24904c90ceeb71a01a4529ce635cbe61a4543.tar.gz rockbox-bdf24904c90ceeb71a01a4529ce635cbe61a4543.zip |
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
-rwxr-xr-x | tools/release | 25 |
1 files changed, 25 insertions, 0 deletions
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 "") { | |||
7 | exit; | 7 | exit; |
8 | } | 8 | } |
9 | 9 | ||
10 | if(!-f "apps/version.h") { | ||
11 | print "run this script in the root dir\n"; | ||
12 | exit; | ||
13 | } | ||
14 | |||
10 | @files=`find . -name FILES`; | 15 | @files=`find . -name FILES`; |
11 | 16 | ||
12 | my @entries; | 17 | my @entries; |
@@ -31,6 +36,9 @@ sub add { | |||
31 | 36 | ||
32 | open(FILE, "<$file"); | 37 | open(FILE, "<$file"); |
33 | while(<FILE>) { | 38 | while(<FILE>) { |
39 | if($_ =~ /^ *\#/) { | ||
40 | next; | ||
41 | } | ||
34 | chomp; | 42 | chomp; |
35 | push @entries, "$dir/$_"; | 43 | push @entries, "$dir/$_"; |
36 | } | 44 | } |
@@ -75,6 +83,23 @@ for(@entries) { | |||
75 | `cp -p $_ $dir`; | 83 | `cp -p $_ $dir`; |
76 | } | 84 | } |
77 | 85 | ||
86 | |||
87 | if(!open(VERSION, "<apps/version.h")) { | ||
88 | print "Can't read version.h\n"; | ||
89 | exit; | ||
90 | } | ||
91 | |||
92 | if(!open(THIS, ">rockbox-$version/apps/version.h")) { | ||
93 | print "Can't create a new version.h for this version\n"; | ||
94 | exit; | ||
95 | } | ||
96 | while(<VERSION>) { | ||
97 | $_ =~ s/^\#define APPSVERSION .*/\#define APPSVERSION \"$version\"/; | ||
98 | print THIS $_; | ||
99 | } | ||
100 | close(VERSION); | ||
101 | close(THIS); | ||
102 | |||
78 | `tar -cf rockbox-$version.tar rockbox-$version`; | 103 | `tar -cf rockbox-$version.tar rockbox-$version`; |
79 | `gzip -9 rockbox-$version.tar`; | 104 | `gzip -9 rockbox-$version.tar`; |
80 | `rm -rf rockbox-$version`; | 105 | `rm -rf rockbox-$version`; |