~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to util/copy.pl

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
# Perl script 'copy' comment. On Windows the built in "copy" command also
9
9
# copies timestamps: this messes up Makefile dependencies.
10
10
 
 
11
my $stripcr = 0;
 
12
 
11
13
my $arg;
12
14
 
13
15
foreach $arg (@ARGV) {
 
16
        if ($arg eq "-stripcr")
 
17
                {
 
18
                $stripcr = 1;
 
19
                next;
 
20
                }
14
21
        $arg =~ s|\\|/|g;       # compensate for bug/feature in cygwin glob...
15
22
        foreach (glob $arg)
16
23
                {
49
56
                                        || die "Can't Open $dfile";
50
57
        while (sysread IN, $buf, 10240)
51
58
                {
 
59
                if ($stripcr)
 
60
                        {
 
61
                        $buf =~ tr/\015//d;
 
62
                        }
52
63
                syswrite(OUT, $buf, length($buf));
53
64
                }
54
65
        close(IN);