Use explicitly relative paths when sourcing now that . is not in path

Add comment about perf issues with menu()
This commit is contained in:
Uriel 2008-10-26 05:29:42 +01:00
parent 9139cdafc6
commit bdf9922a24
4 changed files with 25 additions and 22 deletions

View file

@ -30,6 +30,8 @@ fn hide_paths {
}
# Sidebar
# PERF: menu takes ~30% of werc's runtime, even for top level pages.
# Maybe a combination of du -a/find|sort could let us avoid the recursive awk calls...
fn menu {
ls -F $1 | sed $dirfilter | awk -F/ '
BEGIN { print "<ul class=\"side-bar\">" }
@ -234,10 +236,10 @@ baseuri=http://$site/
for(i in siteTitle siteSubTitle pageTitle extraHeaders)
$i = ''
. etc/initrc
. ./etc/initrc
if(test -f etc/initrc.local)
. etc/initrc.local
. ./etc/initrc.local
# Parse request URL
@ -275,7 +277,7 @@ for (i in ('' $args)) {
}
if (test -f $fpath/_werc/config)
. $fpath/_werc/config
. ./$fpath/_werc/config
if (~ $#blogDirs 0 && ~ $#inBlog 0 && ~ $i [Bb]log)
inBlog = 'yes'