#!/usr/bin/perl -w # # Ceci est un script sur mesure pour update-scnco. # use strict; sub find_files { my ($dir, $want) = @_; local $_; my $d; # Look for a Makefile. if (-f "$dir/Makefile") { print $dir, "\n" if $want eq 'make'; # Only html keep running. return unless $want eq 'html'; } # For each file. if (opendir $d, $dir) { while ($_ = readdir $d) { my $f = $dir . '/' . $_; # Skip ., .., and hidden files. next if /^\./; # Skip Doxygen dirs. next if $_ eq 'html'; # Skip robot www dir. next if $_ eq 'www'; # Recurse to subdirs. if (-d $f) { find_files ($f, $want); } # Find (aft) text files or recent html files. elsif ($want eq 'txt' && /\.txt$/ || $want eq 'html' && /\.html$/ && -M $f < 10) { print $f, "\n"; } } closedir $d; } } if (scalar @ARGV != 1 || $ARGV[0] !~ /^(?:make|txt|html)$/) { print <