Commit | Line | Data |
---|---|---|
39dbb0c0 JH |
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 JH |
14 | my @FILES = qw( |
15 | djgpp/configure.bat | |
16 | README.ce | |
17 | README.dos | |
27da23d5 | 18 | README.symbian |
39dbb0c0 | 19 | README.win32 |
27da23d5 JH |
20 | symbian/config.pl |
21 | symbian/makesis.pl | |
22 | symbian/README | |
23 | symbian/xsbuild.pl | |
39dbb0c0 JH |
24 | win32/Makefile |
25 | win32/makefile.mk | |
f2f3c3ac RGS |
26 | win32/Makefile.ce |
27 | win32/ce-helpers/compile-all.bat | |
28 | win32/ce-helpers/compile.bat | |
29 | win32/ce-helpers/registry.bat | |
39dbb0c0 JH |
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 | } |