Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe3db7d

Browse files
committed
Work around limitation of Cygwin Perl: To avoid a permission denial, we need
to do the inplace-edit with a backup file. A quick test leads me to believe this is sufficient to allow building the documentation on Cygwin; a full test is in progress.
1 parent b9132a2 commit fe3db7d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Doc/tools/node2label.pl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#! /usr/bin/env perl
22

3+
# On Cygwin, we actually have to generate a temporary file when doing
4+
# the inplace edit, or we'll get permission errors. Not sure who's
5+
# bug this is, except that it isn't ours. To deal with this, we
6+
# generate backups during the edit phase and remove them at the end.
7+
#
38
use English;
4-
$INPLACE_EDIT = '';
9+
$INPLACE_EDIT = '.bak';
510

611
# read the labels, then reverse the mappings
712
require "labels.pl";
@@ -60,3 +65,7 @@
6065
foreach $oldname (keys %newnames) {
6166
rename($oldname, $newnames{$oldname});
6267
}
68+
69+
foreach $filename (glob('*.bak')) {
70+
unlink($filename);
71+
}

0 commit comments

Comments
 (0)