Commit | Line | Data |
39dbb0c0 |
1 | #!/usr/bin/perl -ws |
2 | |
3 | # curliff.pl - convert certain files in the Perl distribution that |
4 | # need to be in CR-LF format to CR-LF, or back to LF format (with the |
5 | # -r option). The CR-LF format is NOT to be used for checking in |
6 | # files to the Perforce repository, but it IS to be used when making |
7 | # Perl snapshots or releases. |
8 | |
9 | use strict; |
10 | |
11 | use vars qw($r); |
12 | |
27da23d5 |
13 | # This list is also in makerel. |
39dbb0c0 |
14 | my @FILES = qw( |
15 | djgpp/configure.bat |
16 | README.ce |
17 | README.dos |
27da23d5 |
18 | README.symbian |
39dbb0c0 |
19 | README.win32 |
27da23d5 |
20 | symbian/config.pl |
21 | symbian/makesis.pl |
22 | symbian/README |
23 | symbian/xsbuild.pl |
39dbb0c0 |
24 | win32/Makefile |
25 | win32/makefile.mk |
27da23d5 |
26 | wince/Makefile.ce |
39dbb0c0 |
27 | wince/compile-all.bat |
39dbb0c0 |
28 | wince/README.perlce |
29 | wince/registry.bat |
30 | ); |
31 | |
32 | { |
33 | local($^I, @ARGV) = ('.orig', @FILES); |
34 | while (<>) { |
35 | if ($r) { |
36 | s/\015\012/\012/; # Curliffs to liffs. |
37 | } else { |
38 | s/\015?\012/\015\012/; # Curliffs and liffs to curliffs. |
39 | } |
40 | print; |
41 | close ARGV if eof; # Reset $. |
42 | } |
43 | } |