mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Creation of OpenFOAM-dev repository 15/04/2008
This commit is contained in:
37
doc/Doxygen/tools/find-junkFiles
Executable file
37
doc/Doxygen/tools/find-junkFiles
Executable file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use File::Find ();
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# Script
|
||||
# find-junkFiles
|
||||
#
|
||||
# Description
|
||||
# Search for "junk" files left over from editor, core, CVS, etc.
|
||||
#
|
||||
# - print filename only
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
sub wanted {
|
||||
return unless -f $_;
|
||||
|
||||
if (
|
||||
m{^\.?.+~$} ## editor backup
|
||||
or m{^\#.+\#$} ## editor autosave
|
||||
or m{^\.\#.+$} ## cvs replace update (eg, ".#test.c.1.3")
|
||||
or m{^core(\.\d+)?$} ## core dump
|
||||
) {
|
||||
print "$File::Find::name\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
## Traverse desired filesystems
|
||||
for my $dir (@ARGV) {
|
||||
no warnings 'File::Find';
|
||||
warn "(**) checking '$dir' ...\n";
|
||||
File::Find::find( { wanted => \&wanted }, $dir );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user