mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
merge-pod changes for cygwin and MSWin32 perl
On Windows, the git repository is checked out as CR-LF.
Tell perl to open the pod file with cr-lf as the end of line.
On Windows, the input file names are of the form podX\foo.pod.in.
Cygwin perl cannot parse the directory for the file name unless
the path separator is converted from \ to /.
Reviewed-on: http://gerrit.openafs.org/5113
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from 0b6247c27f
)
Change-Id: Ifc4a649ee2b59115632f8d27a00b2bdb794822d1
Reviewed-on: http://gerrit.openafs.org/5141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
2efb653cf2
commit
cd516507a6
@ -18,12 +18,15 @@ use File::Basename qw(dirname basename);
|
||||
my $start = getcwd;
|
||||
for my $file (@ARGV) {
|
||||
chdir $start or die "cannot chdir to $start: $!\n";
|
||||
$file =~ s:\\:/:g if $^O eq 'cygwin';
|
||||
my $dir = dirname ($file);
|
||||
my $out = $file;
|
||||
unless ($out =~ s/\.in\z//) {
|
||||
die "input file $file does not end in .in\n";
|
||||
}
|
||||
open (FILE, "< $file") or die "cannot open $file: $!\n";
|
||||
binmode FILE, ':crlf' if $^O eq 'MSWin32';
|
||||
binmode FILE, ':crlf' if $^O eq 'cygwin';
|
||||
open (OUT, "> $out") or die "cannot open $out: $!\n";
|
||||
chdir $dir or die "cannot chdir to $dir: $!\n";
|
||||
local $/ = '';
|
||||
|
Loading…
Reference in New Issue
Block a user