From 5386b775b2fbce68cbc846f7dac3ef495e72457a Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 24 Sep 2007 22:05:56 +0000 Subject: Set svn:eol-style on a bunch of text-looking files that didn't have it git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19972 dc483132-0cff-0310-8789-dd5450dbe970 --- src/windows/build/makeZip.pl | 166 +++++++++++++++++++++---------------------- 1 file changed, 83 insertions(+), 83 deletions(-) (limited to 'src/windows/build/makeZip.pl') diff --git a/src/windows/build/makeZip.pl b/src/windows/build/makeZip.pl index 1a1b533c33..30f0cf14b3 100644 --- a/src/windows/build/makeZip.pl +++ b/src/windows/build/makeZip.pl @@ -1,84 +1,84 @@ -#!perl -w - -#use strict; - -require "prunefiles.pl"; - -use Data::Dumper; - -sub makeZip { - local ($zip, $config) = @_; - - local $odr = $config->{Config}; ## Options, directories, repository, environment. - local $src = $odr->{src}->{value}; - local $out = $odr->{out}->{value}; - local $zipname = $zip->{filename}; - local $filestem = $config->{Stages}->{PostPackage}->{Config}->{FileStem}->{name}; - $zipname =~ s/%filestem%/$filestem/g; - if (exists $zip->{Requires}) { - local $bMakeIt = 1; - local $rverb = $odr->{repository}->{value}; - local $j = 0; - while ($zip->{Requires}->{Switch}[$j]) { ## Check Require switches - local $switch = $zip->{Requires}->{Switch}[$j]; - if (exists $switch->{name}) { ## Ignore dummy entry - # We handle REPOSITORY and CLEAN switches: - if ($switch->{name} =~ /REPOSITORY/i) { - $bMakeIt &&= ($switch->{value} =~ /$rverb/i); ## Repository verb must match requirement - } - elsif ($switch->{name} =~ /CLEAN/i) { ## Clean must be specified - $bMakeIt &&= $clean; - } - else {print "Error -- Unsupported switch $switch->{name} in Requires in ".Dumper($zip); - $bMakeIt = 0; - } - } - $j++; - } - if ( !$bMakeIt ) { - if (exists $zip->{Requires}->{ErrorMsg}) { - print "Error -- $zip->{Requires}->{ErrorMsg}->{text}\n"; - } - else { - print "Error -- requirements not met for building $zipname.\n"; - } - return 0; - } - } - - local $ziptemp = "$out\\ziptemp"; - chdir "$out"; - print "Info -- chdir to ".`cd`."\n" if ($verbose); - system("rm -rf $ziptemp") if (-d $ziptemp); - die "Fatal -- Couldn't remove $ziptemp" if (-d $ziptemp); - mkdir($ziptemp); - # Set up the zip's config section: - $zip->{Config} = $config->{Stages}->{PostPackage}->{Config}; - # Add to the copylist's config section. Don't copy Postpackage->Config, - # because the CopyList's Config might contain substitution tags. - $zip->{CopyList}->{Config}->{FileStem}->{name} = $config->{Stages}->{PostPackage}->{Config}->{FileStem}->{name}; - $zip->{CopyList}->{Config}->{From}->{root} = "$src\\pismere"; ## Add zip-specific config settings. - $zip->{CopyList}->{Config}->{To}->{root} = $ziptemp; - copyFiles($zip->{CopyList}, $config); - # Drop down into /ziptemp so the path to the added file won't include : - chdir $ziptemp; - print "Info -- chdir to ".`cd`."\n" if ($verbose); - - # Prune any unwanted files or directories from the directory we're about to zip: - 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.";} - $zipfile->writeToFileNamed($zipname); - chdir("$out"); - print "Info -- chdir to ".`cd`."\n" if ($verbose); - # move .zip from /ziptemp to . - !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); - } - +#!perl -w + +#use strict; + +require "prunefiles.pl"; + +use Data::Dumper; + +sub makeZip { + local ($zip, $config) = @_; + + local $odr = $config->{Config}; ## Options, directories, repository, environment. + local $src = $odr->{src}->{value}; + local $out = $odr->{out}->{value}; + local $zipname = $zip->{filename}; + local $filestem = $config->{Stages}->{PostPackage}->{Config}->{FileStem}->{name}; + $zipname =~ s/%filestem%/$filestem/g; + if (exists $zip->{Requires}) { + local $bMakeIt = 1; + local $rverb = $odr->{repository}->{value}; + local $j = 0; + while ($zip->{Requires}->{Switch}[$j]) { ## Check Require switches + local $switch = $zip->{Requires}->{Switch}[$j]; + if (exists $switch->{name}) { ## Ignore dummy entry + # We handle REPOSITORY and CLEAN switches: + if ($switch->{name} =~ /REPOSITORY/i) { + $bMakeIt &&= ($switch->{value} =~ /$rverb/i); ## Repository verb must match requirement + } + elsif ($switch->{name} =~ /CLEAN/i) { ## Clean must be specified + $bMakeIt &&= $clean; + } + else {print "Error -- Unsupported switch $switch->{name} in Requires in ".Dumper($zip); + $bMakeIt = 0; + } + } + $j++; + } + if ( !$bMakeIt ) { + if (exists $zip->{Requires}->{ErrorMsg}) { + print "Error -- $zip->{Requires}->{ErrorMsg}->{text}\n"; + } + else { + print "Error -- requirements not met for building $zipname.\n"; + } + return 0; + } + } + + local $ziptemp = "$out\\ziptemp"; + chdir "$out"; + print "Info -- chdir to ".`cd`."\n" if ($verbose); + system("rm -rf $ziptemp") if (-d $ziptemp); + die "Fatal -- Couldn't remove $ziptemp" if (-d $ziptemp); + mkdir($ziptemp); + # Set up the zip's config section: + $zip->{Config} = $config->{Stages}->{PostPackage}->{Config}; + # Add to the copylist's config section. Don't copy Postpackage->Config, + # because the CopyList's Config might contain substitution tags. + $zip->{CopyList}->{Config}->{FileStem}->{name} = $config->{Stages}->{PostPackage}->{Config}->{FileStem}->{name}; + $zip->{CopyList}->{Config}->{From}->{root} = "$src\\pismere"; ## Add zip-specific config settings. + $zip->{CopyList}->{Config}->{To}->{root} = $ziptemp; + copyFiles($zip->{CopyList}, $config); + # Drop down into /ziptemp so the path to the added file won't include : + chdir $ziptemp; + print "Info -- chdir to ".`cd`."\n" if ($verbose); + + # Prune any unwanted files or directories from the directory we're about to zip: + 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.";} + $zipfile->writeToFileNamed($zipname); + chdir("$out"); + print "Info -- chdir to ".`cd`."\n" if ($verbose); + # move .zip from /ziptemp to . + !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 -- cgit