shithub: werc

Download patch

ref: 787cf8185f8e8321ad90c5093dac048bddde33a9
parent: d0d649b95217c64484d11affd69ea5b73a8e61cd
author: uriel <uriel@engel.se.cat-v.org>
date: Sun Dec 28 18:42:24 EST 2008

Two small simplifications to app handling. Specially merge _test and _setup functions into a single _init.

--- a/bin/cgilib.rc
+++ b/bin/cgilib.rc
@@ -265,7 +265,7 @@
     found=()
     for(a in $enabled_apps) {
         . ./apps/$a/app.rc
-        if($a^'_test')
+        if($a^'_init')
             found=yes
     }
 
@@ -273,7 +273,8 @@
 }
 
 fn app_handler {
-    $app_body_handler
+    if(! ~ $#app_body_handler 0)
+        $app_body_handler
 }