[system] / trunk / webwork / system / cgi / source.pl Repository:
ViewVC logotype

Annotation of /trunk/webwork/system/cgi/source.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25 - (view) (download) (as text)

1 : sam 25 #!/bin/sh
2 :    
3 :     # debug should be set to 1 to wrap script output s.t. headers are shown
4 :     # debug_html should be set to 1 to make the content-type of the wrapper
5 :     # headers text/html and 0 to make it text/plain.
6 :    
7 :     debug=0
8 :     debug_html=1
9 :    
10 :     script_name=`basename $0`
11 :     real_script="./cgi-scripts/$script_name"
12 :    
13 :     if [ $debug = 1 ]
14 :     then
15 :     if [ $debug_html = 1 ]
16 :     then
17 :     echo "Content-type: text/html"
18 :     else
19 :     echo "Content-type: text/plain"
20 :     fi
21 :     echo ""
22 :     $real_script 2>&1
23 :     else
24 :     $real_script
25 :     fi

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9