The R Project SVN R

Rev

Rev 37507 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37507 Rev 37908
Line 36... Line 36...
36
use Text::Wrap;
36
use Text::Wrap;
37
 
37
 
38
## Don't buffer output.
38
## Don't buffer output.
39
$| = 1;
39
$| = 1;
40
 
40
 
41
my $revision = ' $Rev: 37507 $ ';
41
my $revision = ' $Rev: 37908 $ ';
42
my $version;
42
my $version;
43
my $name;
43
my $name;
44
$revision =~ / ([\d\.]*) /;
44
$revision =~ / ([\d\.]*) /;
45
$version = $1;
45
$version = $1;
46
($name = $0) =~ s|.*/||;
46
($name = $0) =~ s|.*/||;
Line 285... Line 285...
285
    &add_build_stamp_to_description_file(&file_path($pkgname,
285
    &add_build_stamp_to_description_file(&file_path($pkgname,
286
						    "DESCRIPTION"));
286
						    "DESCRIPTION"));
287
    $log->message("checking for LF line-endings in source files");
287
    $log->message("checking for LF line-endings in source files");
288
    if($is_bundle) {
288
    if($is_bundle) {
289
	foreach my $ppkg (@bundlepkgs) {
289
	foreach my $ppkg (@bundlepkgs) {
290
	    &fix_CRLF_in_source_files(&file_path($pkgname, $ppkg));
290
	    &fix_CRLF_in_source_files(&file_path($pkgname, $ppkg), $log);
291
	}
291
	}
292
    } else {
292
    } else {
293
	&fix_CRLF_in_source_files($pkgname);
293
	&fix_CRLF_in_source_files($pkgname, $log);
294
    }
294
    }
295
 
295
 
296
    sub empty_dir_check {
296
    sub empty_dir_check {
297
	if(-d $_) {
297
	if(-d $_) {
298
	    opendir(DIR, $_) or die "cannot open dir $File::Find::name: $!";
298
	    opendir(DIR, $_) or die "cannot open dir $File::Find::name: $!";
Line 622... Line 622...
622
    update_index($oldindex, $newindex, $log);
622
    update_index($oldindex, $newindex, $log);
623
    1;
623
    1;
624
}
624
}
625

625

626
sub fix_CRLF_in_source_files {
626
sub fix_CRLF_in_source_files {
627
    my ($pkgname) = @_;
627
    my ($pkgname, $log) = @_;
628
 
628
 
629
    if(-d "$pkgname/src") {
629
    if(-d "$pkgname/src") {
630
	my @src_files = &list_files_with_exts("$pkgname/src", "(c|h|f|cc|cpp)");
630
	my @src_files = &list_files_with_exts("$pkgname/src", "(c|h|f|cc|cpp)");
631
	foreach my $file (@src_files) {
631
	foreach my $file (@src_files) {
632
	    my $has_CRLF = 0;
632
	    my $has_CRLF = 0;