]> git.saurik.com Git - wxWidgets.git/blob - build/tools/svn-find-native-eols.pl
new settings for iphone
[wxWidgets.git] / build / tools / svn-find-native-eols.pl
1 #!/usr/bin/perl
2 #
3 # This script must be ran from svn checkout and will produce the list of all
4 # files using native svn:eol-style on output. It's used as a helper for
5 # distribution creation as this is also the list of files which need to have
6 # their line endings converted for the use on the platform other than the
7 # current one.
8 #
9 # Notice that the script requires Perl 5.10 (which could be easily avoided but
10 # as this is for my personal use mostly so far, I didn't bother) and Perl svn
11 # bindings.
12 use 5.10.0;
13 use strict;
14 use warnings;
15 use SVN::Client;
16
17 my $ctx = SVN::Client->new
18 or die "Failed to create svn context, do you have svn auth stored?\n";
19
20 # For testing purposes a single parameter may be specified to restrict the list
21 # of files with native EOLs to just this directory (recursively) or even a
22 # single file. In normal use no parameters should be given.
23 my $path = $ARGV[0] // '';
24 my $props = $ctx->proplist($path, undef, 1)
25 or die "Failed to list properties for $path.\n";
26
27 foreach my $prop (@$props) {
28 my $eol = ${$prop->prop_hash()}{'svn:eol-style'};
29 if ( defined $eol && ($eol eq 'native') ) {
30 say $prop->node_name();
31 }
32 }