Annotation of elwix/config/etc/default/chilli/wwwsh, revision 1.1

1.1     ! misho       1: #!/bin/sh
        !             2: # (c) 2007 David Bird; Released under GPL.
        !             3: # This simple script dispatches the <file>.chi embedded CGI scripts.
        !             4: # If <file>.chi exists, and we have haserl, then we run "haserl file.chi"
        !             5: # Otherwise, we look for <file>.chi.sh files to run as shell scripts. 
        !             6: 
        !             7: file=$(basename $1)
        !             8: dir=$(dirname $1)
        !             9: haserl=$(which haserl 2>/dev/null)
        !            10: cd $dir
        !            11: 
        !            12: # should be make a bit safer!
        !            13: 
        !            14: if [ -z "$haserl" ]; then
        !            15:     if [ -e "$file.sh" ]; then
        !            16:        sh $file.sh
        !            17:     else
        !            18:        echo "<p>You need to install haserl to serve pages with this wwwsh script!</p>"
        !            19:        echo "<p>see <a href='http://haserl.sourceforge.net/'>http://haserl.sourceforge.net/</a></p>"
        !            20:     fi
        !            21:     exit
        !            22: fi
        !            23: 
        !            24: $haserl $file

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>