#!/bin/sh #-- according to the rewrite rules files ending in .xhtml #-- will be redirected to this script. The lines below strip #-- the xhtml suffix and seperate the filename from the path. #-- links should point to "file.xhtml" and the text file should #-- should be called "file.txt" #sFileName=$(echo $QUERY_STRING | sed 's@^.*/\([^/]*\)$@\1@;s@\.[^\.]*$@@') sFileName=$(echo $QUERY_STRING | sed 's@^.*/\([^/]*\)$@\1@;') sDirName=$(echo $QUERY_STRING | sed 's@/[^/]*$@@') if [ "$sDirName" = "$QUERY_STRING" ] then sDirName="" fi if [ "$sFileName" = "" ] then sFileName=index fi echo "Content-Type: text/html" echo "" #-- The 2>&1 idiom below is usefull for finding the cause of #-- errors as stderr will be directed to stdout and to the #-j- output of the cgi script. echo "" echo "" echo "" echo "" echo "" echo '' echo "" echo "" echo " " echo "" echo "" echo " " echo "" echo "
..." echo "" echo "

Bumble.sf.net

" echo "

thoughts on language and parsing

" echo "
" if [ -f ../htdocs/${sDirName}/*.img.* ] then echo "image" fi echo "
...
" #sed -f makehtml.sed ../htdocs/${QUERY_STRING}index.txt 2>&1 #-- an attempt to create language page links like "ca | es | en" etc #-- ls ../htdocs/${sDirName}/${sFileName}.*.txt 2>&1 sed -f makehtml.sed ../htdocs/${sDirName}/${sFileName}.txt 2>&1 echo '
SourceForge.net Logo
' echo "
" echo "" echo ""