3 # Remove all files present in the htmlcache subdirectory of each project.
4 # A count of projects that had files to be removed is displayed.
15 my $bd = $Girocco::Config
::reporoot
. '/';
16 my @projects = Girocco
::Project
::get_full_list
();
17 my $progress = Girocco
::CLIUtil
::Progress
->new(
18 scalar(@projects), "Clearing htmlcache files");
21 my $hcd = $bd . $_ . ".git/htmlcache";
22 opendir my $dh, $hcd or next;
23 my @files = map({/^(?![.][.]?$)(.*)$/ ?
$1 : ()} readdir($dh));
25 unlink($hcd . "/" . $_) foreach @files;
26 @files and ++$cleared;
27 } continue {$progress->update}
29 print "Projects cleared: $cleared\n";