forked from tsee/PathTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbleadcheck.pl
37 lines (25 loc) · 859 Bytes
/
bleadcheck.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl
# A script to check a local copy against bleadperl, generating a blead
# patch if they're out of sync. An optional directory argument will
# be chdir()-ed into before comparing.
use strict;
chdir shift() if @ARGV;
my $blead = shift() || "~/Downloads/perl/bleadperl";
diff( "$blead/lib/File/Spec.pm", "lib/File/Spec.pm");
diff( "$blead/lib/File/Spec", "lib/File/Spec",
qw(t) );
diff( "$blead/lib/File/Spec/t", "t",
qw(cwd.t lib taint.t win32.t) );
diff( "$blead/lib/Cwd.pm", "Cwd.pm" );
diff( "$blead/ext/Cwd/Cwd.xs", "Cwd.xs" );
diff( "$blead/ext/Cwd/t", "t",
qw(Functions.t Spec.t lib crossplatform.t rel2abs2rel.t tmpdir.t) );
######################
sub diff {
my ($first, $second, @skip) = @_;
local $_ = `diff -ur $first $second`;
for my $x ('.svn', @skip) {
s/^Only in .* $x\n//m;
}
print;
}