CGI no longer assumes CWD

This commit is contained in:
Neale Pickett 2010-06-09 00:10:05 -05:00
parent 6fc2cbd238
commit 954550438a
3 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,8 @@ import urllib
import os import os
import sys import sys
os.chdir(os.path.dirname(sys.argv[0]))
f = cgi.FieldStorage() f = cgi.FieldStorage()
s = f.getfirst('sett') s = f.getfirst('sett')

View File

@ -1,5 +1,7 @@
#! /bin/sh #! /bin/sh
cd $(dirname $0)
randint () { randint () {
seq $1 $2 | shuf -n 1 seq $1 $2 | shuf -n 1
} }

View File

@ -1,5 +1,7 @@
#! /bin/sh #! /bin/sh
cd $(dirname $0)
intro () { intro () {
shuf -n 1 <<EOF shuf -n 1 <<EOF
How's it going? How's it going?