mirror of
https://git.freebsd.org/ports.git
synced 2025-07-15 08:19:13 -04:00
these will be added as soon as I can track them down properly (probably along with an upgrade to 3.1.1) This update incorporates contributions from Dru Lavigne and Dmitriy Kirhlarov, and was sponsored by the University of Tromsø (uit.no).
17 lines
699 B
Bash
17 lines
699 B
Bash
--- tools/htpython.sh.orig Thu Apr 15 09:17:47 2004
|
|
+++ tools/htpython.sh Mon Aug 21 11:02:14 2006
|
|
@@ -27,12 +27,13 @@
|
|
|
|
webroot=${1-$PWD}
|
|
prefix=${2-/usr/local/nav/apache/webroot}
|
|
+pylibdir=$(realpath ${prefix}/../../lib/python)
|
|
|
|
echo Working from $webroot
|
|
cd $webroot
|
|
candidates=`find . -name '.htaccess' -type f -printf "%P\00" | xargs -0 grep -li "SetHandler.*python-program"`
|
|
for cand in $candidates; do
|
|
- ppath="PythonPath \"sys.path+['${prefix}/`dirname ${cand}`']\""
|
|
+ ppath="PythonPath \"sys.path+['${prefix}/`dirname ${cand}`', '${pylibdir}']\""
|
|
if grep -iq "^PythonPath" ${cand}; then
|
|
perl -pi -e "s%^PythonPath.*$%${ppath}%i" ${cand} && echo Replaced ${ppath}
|
|
else
|