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 | |
13 | my @FILES = qw( |
14 | djgpp/configure.bat |
15 | README.ce |
16 | README.dos |
17 | README.win32 |
18 | win32/Makefile |
19 | win32/makefile.mk |
20 | wince/compile-all.bat |
21 | wince/README.compile |
22 | wince/README.perlce |
23 | wince/registry.bat |
24 | ); |
25 | |
26 | { |
27 | local($^I, @ARGV) = ('.orig', @FILES); |
28 | while (<>) { |
29 | if ($r) { |
30 | s/\015\012/\012/; # Curliffs to liffs. |
31 | } else { |
32 | s/\015?\012/\015\012/; # Curliffs and liffs to curliffs. |
33 | } |
34 | print; |
35 | close ARGV if eof; # Reset $. |
36 | } |
37 | } |