mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-02 17:09:36 +03:00
4eb32d3f76
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3894 1f5c12ca-751b-0410-a591-d2e778427230
19 lines
582 B
Perl
Executable File
19 lines
582 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
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";
|
|
|
|
foreach $name (@names) {
|
|
next if ($name eq "."); # skip the current directory entry
|
|
next if ($name eq ".."); # skip the parent directory entry
|
|
|
|
if (-d $name){ # is this a directory?
|
|
`astyle --style="k&r" -s2 --recursive -v $name/*.h $name/*.cpp`;
|
|
next; # can skip to the next name in the for loop
|
|
}
|
|
}
|
|
|
|
closedir(DIR);
|