commit 67cc77eca4f37acd6e8e15a3eff7404ea6f3e033
parent d264d6b3e67b61aa8554dc973a61cd0a8eecc3f8
Author: uriel@engel.se.cat-v.org <unknown>
Date: Sat, 20 Dec 2008 02:18:11 +0100
Make sites/ dir configurable.
Diffstat:
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/bin/werc.rc b/bin/werc.rc
@@ -6,13 +6,12 @@ forbidden_uri_chars='[^a-zA-Z0-9_+\-\/\.]'
response_format=html
fn get_lib_file {
- wantedfile = $1
- if (test -f $sitedir/_werc/lib/$wantedfile)
- echo -n $sitedir/_werc/lib/$wantedfile
- if not if(! ~ $#masterSite 0 && test -f sites/$masterSite/_werc/lib/$wantedfile)
- echo -n sites/$masterSite/_werc/lib/$wantedfile
- if not if (test -f lib/$wantedfile)
- echo -n lib/$wantedfile
+ if (test -f $sitedir/_werc/lib/$1)
+ echo -n $sitedir/_werc/lib/$1
+ if not if(! ~ $#masterSite 0 && test -f $sitesdir/$masterSite/_werc/lib/$1)
+ echo -n $sitesdir/$masterSite/_werc/lib/$1
+ if not if (test -f lib/$1)
+ echo -n lib/$1
}
# Title
diff --git a/etc/initrc b/etc/initrc
@@ -14,8 +14,9 @@ plan9port=$PLAN9
# Path, make sure the plan9port /bin directory is included before /bin
path=($plan9port/bin/ ./bin/ /bin/ /usr/bin/ ./bin/contrib/)
-# Directory where your site(s) live ($site here is your domain name, eg., example.com)
-sitedir=sites/$site
+# Directories where your site(s) live ($site here is your domain name, eg., example.com)
+sitesdir=sites
+sitedir=$sitesdir/$site
# Set this to your favorite markdown formatter, eg., markdown.pl (fproc_cache
# is a wrapper around a script it takes as an argument, in the default