link to .pl files
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 1 May 2010 12:53:41 +0000 (12:53 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 1 May 2010 12:53:41 +0000 (12:53 +0000)
git-svn-id: file:///home/dpavlin/private/svn/sysadmin-cookbook-html@13 3e18072f-9615-4e06-9d3a-648eafba3f8d

bin/html.pl

index 701838d..f247856 100755 (executable)
@@ -43,7 +43,7 @@ sub file {
        $path =~ s{^$recepies/*(.*?[^/]+)$}{$1} || next;
        return ''
                . qq|<ul class=changes>$changes</ul>|
-               . ( $path =~ m{(\.sh|Makefile|\.conf)$}i ? qq|<a class="path" href="$svn/view/recepies/$path">$path</a>| : '' )
+               . ( $path =~ m{(\.sh|Makefile|\.conf|\.pl)$}i || -e $path ? qq|<a class="path" href="$svn/view/recepies/$path">$path</a>| : '' )
                . qq|<pre class=content>$content</pre>|
                ;
 }