X-Git-Url: http://git.rot13.org/?p=sysadmin-cookbook-html;a=blobdiff_plain;f=bin%2Fhtml.pl;h=6039b361b649dd1bd424b7e9e752fc0656902ce3;hp=537ded0cace4b39ccd07bcdaa90bbcb958f3781a;hb=b356e721222c6504f99da41d51206092e3792b3e;hpb=7cd12d88f74e84a75343307994f105e90ddc0933 diff --git a/bin/html.pl b/bin/html.pl index 537ded0..6039b36 100755 --- a/bin/html.pl +++ b/bin/html.pl @@ -3,7 +3,7 @@ use warnings; use strict; -my $recepies = '/srv/sysadmin-cookbook/recepies'; +my $recepies = 'recepies/'; use File::Find; use File::Slurp; @@ -47,7 +47,7 @@ sub file { my @names; find({ follow => 0, no_chdir => 1, wanted => sub { - push @names, $_ unless m{/\.}; + push @names, $_ unless m{/\.} || m{^\.}; }}, $recepies ); my $last_level = 0; @@ -75,6 +75,8 @@ my $to_path = ''; foreach my $path ( sort @names ) { + next if ( -d $path && ! -e "$path/.svn" ); + my $name = $path; $name =~ s{^$recepies.*?([^/]+)$}{$1} || next; next unless $name;