* Fix some doc.sw tips

This commit is contained in:
pancake 2010-07-21 00:36:55 +02:00
parent f88db14126
commit ae8799b6b6
3 changed files with 15 additions and 1 deletions

13
doc.sw/sw.conf Normal file
View File

@ -0,0 +1,13 @@
# Configuration
TITLE="radare.org" # Site title
SUBTITLE="documentation" # Site subtitle
SITE="site" # Site folder
#BL="^index.md$ ^images$" # Black list
BL="^images$" # Black list
PREFIX="" # sw location ("/" is wwwroot)
#PREFIX="./" # sw location ("/" is wwwroot)
BIN="sw.cgi" # CGI name
STYLE="style.css" # Stylesheet name
# External apps
MDHANDLER="md2html.awk" # md handler

View File

@ -1,3 +1,4 @@
#!/bin/awk -f
#!/usr/bin/awk -f
#
# by: Jesus Galan (yiyus) 2009

View File

@ -23,7 +23,7 @@ cd `dirname ${IDIR}`
FILES=`find ${IDIR} -iname "*.md"`
for a in $FILES ; do
echo "* $a"
REQUEST_URI=$(echo /sw.cgi/$a|sed "s,${IDIR},,") SWCONF="./sw.conf" /var/www/sw.cgi > xxx
REQUEST_URI=$(echo /sw.cgi/$a|sed "s,${IDIR},,") SWCONF="./sw.conf" sw.cgi > xxx
[ $? = 1 ] && exit 1 # this hack is to detect exit 1 of sw.cgi... kinda ugly :)
b="$CDIR/`echo "$a"|sed -e 's,.md$,.html,g'|sed -e "s,${IDIR},${ODIR},g"`"
cat xxx | sed -e "s,sw.cgi,./,g" -e 's,\.md",.html",g' | \