shithub: werc

Download patch

ref: c1110b65504664c251683b2842ee118e09b77961
parent: 0f025632a9d4b5632d1cafd4a8ddaefa8e4a1aca
author: uriel <uriel@engel.se.cat-v.org>
date: Wed Jun 27 09:11:05 EDT 2007

Fix wrong permalinks for gsoc.cat-v.org/blog (this is a bit of a special case hack)

--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -74,8 +74,9 @@
 
 fn blogTitle {
     title=`{basename $1 | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' }
+    permlink= `{echo $1 | sed 's,^/[a-z/]*www/,/,; s,^sites/[^/]*/*/,/,; s/\.md$//' }
     du=`{ls -l $1}
-    echo '##<a href="' `{echo $1 | sed 's,^sites/[^/]*/*/,/,; s/\.md$//' } '">' $"title^'</a> *('By $du(4) Last mod: $du(7 8 9) ')*'
+    echo '##<a href="' $"permlink '">' $"title^'</a> *('By $du(4) Last mod: $du(7 8 9) ')*'
 }
 
 # Body