#!/bin/sh # debug should be set to 1 to wrap script output s.t. headers are shown # debug_html should be set to 1 to make the content-type of the wrapper # headers text/html and 0 to make it text/plain. debug=0 debug_html=1 script_name=`basename $0` real_script="./cgi-scripts/$script_name" if [ $debug = 1 ] then if [ $debug_html = 1 ] then echo "Content-type: text/html" else echo "Content-type: text/plain" fi echo "" $real_script 2>&1 else $real_script fi