summaryrefslogtreecommitdiffstats
path: root/util/copy.pl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-02-03 14:57:51 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-02-03 14:57:51 +0000
commit7dbbd4b35775948da01ca86ce9e94886f1347bbd (patch)
tree13b173095096f236d55752585981105ea9e55312 /util/copy.pl
parent544c84b72014a2bf0d0e5bf15c3fcd624a0497bb (diff)
add -stripcr option to copy.pl from 0.9.8
Diffstat (limited to 'util/copy.pl')
-rw-r--r--util/copy.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/copy.pl b/util/copy.pl
index e20b45530a..eba6d5815e 100644
--- a/util/copy.pl
+++ b/util/copy.pl
@@ -8,9 +8,16 @@ use Fcntl;
# Perl script 'copy' comment. On Windows the built in "copy" command also
# copies timestamps: this messes up Makefile dependencies.
+my $stripcr = 0;
+
my $arg;
foreach $arg (@ARGV) {
+ if ($arg eq "-stripcr")
+ {
+ $stripcr = 1;
+ next;
+ }
$arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
foreach (glob $arg)
{
@@ -49,6 +56,10 @@ foreach (@filelist)
|| die "Can't Open $dfile";
while (sysread IN, $buf, 10240)
{
+ if ($stripcr)
+ {
+ $buf =~ tr/\015//d;
+ }
syswrite(OUT, $buf, length($buf));
}
close(IN);