From: Dobrica Pavlinusic Date: Sat, 15 Aug 2009 01:20:45 +0000 (+0000) Subject: use local checkout X-Git-Url: http://git.rot13.org/?p=sysadmin-cookbook-html;a=commitdiff_plain;h=b356e721222c6504f99da41d51206092e3792b3e;ds=sidebyside use local checkout git-svn-id: file:///home/dpavlin/private/svn/sysadmin-cookbook-html@8 3e18072f-9615-4e06-9d3a-648eafba3f8d --- 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;