ref: a1d55e50c902711dcfa1a2c50775925708640e6a
parent: 8dc44eaa5e062a8f763ec54b1be049631ba74894
author: uriel <uriel@suckless.org>
date: Sat Jul 5 21:49:45 EDT 2008
Add some new debug facilities, and also fix a minnor bug in the new blog-sidebar-menu
--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -38,10 +38,9 @@
fn menu {
lsArgs = ('-F')
# XXX will not work properly for $#blogDirs > 1 and matching is hackish
- if ( (! ~ $#inBlog 0) || ! ~ $#blogDirs 0 && (~ $blogDirs^/ *$1 *$1/) ) { # Work in progress XXX
+ if ( ! ~ $#inBlog 0 || ! ~ $#blogDirs 0 && ~ $blogDirs^/ *$1 *$1/ ) { # Work in progress XXX
lsArgs = ($lsArgs -r)
}
-
ls $lsArgs $1 | sed $dirfilter | awk -F/ '
BEGIN { print "<ul class=\"sidebar\">" }
END { print "</ul>" }
@@ -146,6 +145,14 @@
. etc/initrc
+fn dprint {
+ echo $* >[1=2]
+}
+
+if(! ~ $#debug 0) {
+ echo $SERVER_NAME - $REQUEST_URI - >[1=2]
+}
+
if (! ~ $args '') {
#title=$args($#args)
title=$args
@@ -169,7 +176,6 @@
inBlog = 'yes'
}
-echo $body $redirectPermanent>> /tmp/foo
# Redirections and other preprocessing
if (~ $#redirectPermanent 1) {
echo 'Status: 301 Moved Permanantly
@@ -209,7 +215,6 @@
'<link rel="alternate" type="application/rss+xml" title="RSS" href="'$rssuri'" />
'
}
-
fn template {
--- a/etc/initrc
+++ b/etc/initrc
@@ -1,3 +1,4 @@
masterSite=cat-v.org
siteTitle='cat-v'
siteSubTitle='Considered harmful'
+debug=true