diff options
| author | Kevin Koch <kpkoch@mit.edu> | 2007-04-02 16:13:58 +0000 |
|---|---|---|
| committer | Kevin Koch <kpkoch@mit.edu> | 2007-04-02 16:13:58 +0000 |
| commit | bda1c2f72144e81b8aab7db5282cfe323dddf775 (patch) | |
| tree | 0c9b8bc53a4b9f6094949697dc0a0d5be744ab12 /src/windows/build/makeZip.pl | |
| parent | 2f49a4ffe53292a6ce3c46a12e730ad2b6799665 (diff) | |
| download | krb5-bda1c2f72144e81b8aab7db5282cfe323dddf775.tar.gz krb5-bda1c2f72144e81b8aab7db5282cfe323dddf775.tar.xz krb5-bda1c2f72144e81b8aab7db5282cfe323dddf775.zip | |
Uncomment w2k files in corebinaries.xml
Factor processing of <Prunes> xml into pruneFiles.pl.
Factor processing of <Zips> xml into zipXML.pl.
Move SRC zip XML to <FetchSources> section of config file.
Call zipXML in /REPOSITORY CHECKOUT section of script.
Keep track of cleaning of OUTDIR so SRC zip isn't removed during packaging.
Remove UNIXFIND from config file. If UNIXFIND isn't present in the config file, set the in-memory UNIXFIND to c:\tools\cygwin\bin. UNIXFIND is now an implementation detail stored in the in-memory config XML, like the versions read from kerberos.ver.
Prune more temporary files before making SDK zip.
Remove redundant custom files from sdkfiles.xml. Copy *.* from staging/inc instead of *.h -- one .c file is also required.
Target_Version: 1.6.1
Ticket: 5490
Tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19375 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/build/makeZip.pl')
| -rw-r--r-- | src/windows/build/makeZip.pl | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/src/windows/build/makeZip.pl b/src/windows/build/makeZip.pl index 4162386df..12215ddcd 100644 --- a/src/windows/build/makeZip.pl +++ b/src/windows/build/makeZip.pl @@ -1,9 +1,10 @@ #!perl -w
#use strict;
-use Data::Dumper;
-require "signfiles.pl";
+require "prunefiles.pl";
+
+use Data::Dumper;
sub makeZip {
local ($zip, $config) = @_;
@@ -64,40 +65,20 @@ sub makeZip { print "Info -- chdir to ".`cd`."\n" if ($verbose);
# Prune any unwanted files or directories from the directory we're about to zip:
- if (exists $zip->{Prunes}) {
- # Use Unix find instead of Windows find. Save PATH so we can restore it when we're done:
- local $savedPATH = $ENV{PATH};
- $ENV{PATH} = $config->{CommandLine}->{Directories}->{unixfind}->{path}.";".$savedPATH;
- local $prunes = $zip->{Prunes};
- local $j = 0;
- print "Info -- Processing prunes in ".`cd`."\n" if ($verbose);
- while ($prunes->{Prune}->[$j]) {
- if (exists $prunes->{Prune}->[$j]->{name}) { ## Don't process dummy entry!
- local $prune = $prunes->{Prune}->[$j]->{name};
- local $flags = $prunes->{Prune}->[$j]->{flags};
- $flags = "" if (!$flags);
- local $cmd = "find . -".$flags."name $prune";
- print "Info -- Looking for filenames containing $prune\n";
- local $list = `$cmd`;
- foreach $target (split("\n", $list)) {
- print "Info -- Pruning $target\n" if ($verbose);
- !system("rm -rf $target") or die "Error -- Couldn't remove $target.";;
- }
- }
- $j++;
- }
- $ENV{PATH} = $savedPATH;
- }
+ pruneFiles($zip, $config);
local $zipfile = Archive::Zip->new();
local $topdir = $zip->{topdir};
$topdir =~ s/%filestem%/$filestem/g;
$zipfile->addTree('.', $topdir);
- if (-e $zipname) {!system("rm -f $zipname") or die "Error -- Couldn't remove $zipname.";}
+ if (-e $zipname) {!system("rm -f $zipname") or die "Error -- Couldn't remove $zipname.";}
$zipfile->writeToFileNamed($zipname);
- print "Info -- created $out\\$zipname.\n" if ($verbose);
- # move .zip from <out>/ziptemp to <out>.
- !system("mv -f $zipname ..") or die "Error -- Couldn't move $zipname to ..";
+ chdir("$out");
+ print "Info -- chdir to ".`cd`."\n" if ($verbose);
+ # move .zip from <out>/ziptemp to <out>.
+ !system("mv -f ziptemp/$zipname .") or die "Error -- Couldn't move $zipname to ..";
+ system("rm -rf ziptemp") if (-d "ziptemp"); ## Clean up any temp directory.
+ print "Info -- created $out\\$zipname.\n" if ($verbose);
}
return 1;
\ No newline at end of file |
