diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2005-12-13 10:20:23 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2005-12-13 10:20:23 +0000 |
| commit | e07b0bb1e025c442062e17925c4e12f5061df5a1 (patch) | |
| tree | 3a19677bd43cf37dc98355dd2134c8197ade97c7 | |
| parent | 48983b23cc94eba8e54d6101255802cb7232fa26 (diff) | |
| download | rockbox-e07b0bb1e025c442062e17925c4e12f5061df5a1.zip rockbox-e07b0bb1e025c442062e17925c4e12f5061df5a1.tar.gz rockbox-e07b0bb1e025c442062e17925c4e12f5061df5a1.tar.bz2 rockbox-e07b0bb1e025c442062e17925c4e12f5061df5a1.tar.xz | |
Made the script more generic to allow other package creation tools to get
passed to it using the command line. Note that this makes the script use
'xargs'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8227 a1c6a512-1295-4272-9138-f99709370657
| -rwxr-xr-x | tools/buildzip.pl | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl index 1942071..eabf739 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -10,24 +10,49 @@ $ROOT=".."; -if($ARGV[0] eq "-r") { - $ROOT=$ARGV[1]; - shift @ARGV; - shift @ARGV; -} + +my $ziptool="zip"; +my $output="rockbox.zip"; my $verbose; -if($ARGV[0] eq "-v") { - $verbose =1; - shift @ARGV; +my $exe; +my $target; + +while(1) { + if($ARGV[0] eq "-r") { + $ROOT=$ARGV[1]; + shift @ARGV; + shift @ARGV; + } + + elsif($ARGV[0] eq "-z") { + $ziptool=$ARGV[1]; + shift @ARGV; + shift @ARGV; + } + + elsif($ARGV[0] eq "-o") { + $output=$ARGV[1]; + shift @ARGV; + shift @ARGV; + } + + elsif($ARGV[0] eq "-v") { + $verbose =1; + shift @ARGV; + } + else { + $target = $ARGV[0]; + $exe = $ARGV[1]; + last; + } } + my $firmdir="$ROOT/firmware"; -my $target = $ARGV[0]; my $cppdef = $target; -my $exe = $ARGV[1]; sub filesize { my ($filename)=@_; @@ -198,10 +223,10 @@ sub buildzip { buildlangs(".rockbox/langs"); `rm -f $zip`; - `find .rockbox | zip $zip -@ >/dev/null`; + `find .rockbox | xargs $ziptool $zip >/dev/null`; if($image) { - `zip $zip $image`; + `$ziptool $zip $image`; } # remove the .rockbox afterwards @@ -222,7 +247,7 @@ sub runone { my ($type, $target)=@_; # build a full install zip file - buildzip("rockbox.zip", $target, + buildzip($output, $target, ($type eq "player")?0:1); }; |