summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-27 11:57:12 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-27 11:57:12 +0000
commit93a14e20e639ff9d0a8ed6c4fac214bcffff79ad (patch)
treea78dede7fcbacb5b1f564e60c7fc76faef69f8c3 /tools
parent4cd5ad6688b99d95a1b827e59a0d6c1a17b94d7e (diff)
downloadrockbox-93a14e20e639ff9d0a8ed6c4fac214bcffff79ad.tar.gz
rockbox-93a14e20e639ff9d0a8ed6c4fac214bcffff79ad.zip
this script builds release tarballs, pass a version number as argument,
make sure the FILES file include all files to include! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@740 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/release80
1 files changed, 80 insertions, 0 deletions
diff --git a/tools/release b/tools/release
new file mode 100755
index 0000000000..27c2c58ac2
--- /dev/null
+++ b/tools/release
@@ -0,0 +1,80 @@
+#!/usr/bin/env perl
+
+$version = $ARGV[0];
+
+if($version eq "") {
+ print "Enter version number!\n";
+ exit;
+}
+
+@files=`find . -name FILES`;
+
+my @entries;
+
+sub dirpart {
+ my ($file)=@_;
+ my @p=split("/", $file);
+ $p[$#p]=""; # blank the last one
+ my $dir=join("/", @p);
+
+ $dir =~ s/^\.\///; # cut off ./ beginnings
+
+ $dir =~ s/\/$//; # off / trailers
+
+ return $dir;
+}
+
+sub add {
+ my ($file)=@_;
+
+ my $dir=dirpart($file);
+
+ open(FILE, "<$file");
+ while(<FILE>) {
+ chomp;
+ push @entries, "$dir/$_";
+ }
+ close(FILE);
+}
+
+for(@files) {
+ chomp;
+ add($_);
+}
+
+sub mkalldir {
+ my ($dir) = @_;
+
+ my @parts = split("/", $dir);
+
+ #print "IN: $dir\n";
+
+ my $sub="";
+ for(@parts) {
+ #print "PART: $_\n";
+
+ $sub .= "$_";
+ if($_ eq "") {
+ next;
+ }
+ mkdir($sub, 0777);
+ #print "make $sub\n";
+ $sub .= "/";
+ }
+
+}
+
+#mkalldir("rockbox-1.0/firmware/malloc");
+#exit;
+
+for(@entries) {
+ my $dir = dirpart("rockbox-$version/$_");
+ #print "Create $dir\n";
+ mkalldir($dir);
+ #print "Copy $_ to $dir\n";
+ `cp -p $_ $dir`;
+}
+
+`tar -cf rockbox-$version.tar rockbox-$version`;
+`gzip -9 rockbox-$version.tar`;
+`rm -rf rockbox-$version`;