mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 21:42:19 +03:00
beautify
This commit is contained in:
parent
6996973a56
commit
beaf295741
@ -2,23 +2,30 @@
|
||||
|
||||
use strict;
|
||||
|
||||
my $cmd = "astyle --style='k&r' -s2 -v --recursive *.h *.cpp";
|
||||
print STDERR "Executing: $cmd \n";
|
||||
system($cmd);
|
||||
#my $cmd = "astyle --style='k&r' -s2 -v --recursive *.h *.cpp";
|
||||
#print STDERR "Executing: $cmd \n";
|
||||
#system($cmd);
|
||||
|
||||
#opendir(DIR,".") or die "Can't open the current directory: $!\n";
|
||||
opendir(DIR,".") or die "Can't open the current directory: $!\n";
|
||||
|
||||
# read file/directory names in that directory into @names
|
||||
#@names = readdir(DIR) or die "Unable to read current dir:$!\n";
|
||||
my @names = readdir(DIR) or die "Unable to read current dir:$!\n";
|
||||
|
||||
#foreach $name (@names) {
|
||||
# next if ($name eq "."); # skip the current directory entry
|
||||
# next if ($name eq ".."); # skip the parent directory entry
|
||||
foreach my $name (@names) {
|
||||
next if ($name eq "."); # skip the current directory entry
|
||||
next if ($name eq ".."); # skip the parent directory entry
|
||||
next if ($name eq "boost"); # skip the parent directory entry
|
||||
next if ($name eq "contrib"); # skip the parent directory entry
|
||||
next if ($name eq "jam-files"); # skip the parent directory entry
|
||||
next if ($name eq ".git"); # skip the parent directory entry
|
||||
|
||||
# if (-d $name){ # is this a directory?
|
||||
# `astyle --style="k&r" -s2 -v $name/*.h $name/*.cpp`;
|
||||
# next; # can skip to the next name in the for loop
|
||||
# }
|
||||
#}
|
||||
if (-d $name){ # is this a directory?
|
||||
my $cmd = "astyle --style='k&r' -s2 -v --recursive $name/*.h $name/*.cpp";
|
||||
print STDERR "Executing: $cmd \n";
|
||||
system($cmd);
|
||||
|
||||
#closedir(DIR);
|
||||
next; # can skip to the next name in the for loop
|
||||
}
|
||||
}
|
||||
|
||||
closedir(DIR);
|
||||
|
Loading…
Reference in New Issue
Block a user