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.
14 my $bd = $Girocco::Config
::reporoot
. '/';
15 my @projects = Girocco
::Project
::get_full_list
();
16 my $progress = Girocco
::CLIUtil
::Progress
->new(
17 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(++$count)}
29 print "Projects cleared: $cleared\n";