In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/9b6e0960782ad1b03a313fa4234d0a35de5532bc?hp=b7247a80ab6b02ec8a01b2c7c8d927ad173700ea>
- Log ----------------------------------------------------------------- commit 9b6e0960782ad1b03a313fa4234d0a35de5532bc Author: Nicholas Clark <[email protected]> Date: Thu Oct 21 16:18:11 2010 +0100 buildtoc needs to preserve the mode of any file it updates. Makefile.SH should be +x, and t/porting/exe-bit.t rightly gets upset when it is not. ----------------------------------------------------------------------- Summary of changes: pod/buildtoc | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/pod/buildtoc b/pod/buildtoc index 3a572a3..d5fccdd 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -760,11 +760,13 @@ while (my ($target, $name) = each %Targets) { print "Was not modified\n" if $Verbose; next; } + my $mode = (stat $name)[2] // die "$0: Can't stat $name: $!"; rename $name, "$name.old" or die "$0: Can't rename $name to $name.old: $!"; open THING, ">$name" or die "$0: Can't open $name for writing: $!"; binmode THING; print THING $new or die "$0: print to $name failed: $!"; close THING or die "$0: close $name failed: $!"; + chmod $mode & 0777, $name or die "$0: can't chmod $mode $name: $!"; } warn "$0: was not instructed to build anything\n" unless $built; -- Perl5 Master Repository
