Code: Alles auswählen
#!/bin/sh
# transforms PYTHONPATH windows enviroment variable into cygwin UNIX paths
if test -n "$PYTHONPATH"; then
case "$PYTHONPATH" in
?:\\*|*\;*)
old_pythonpath="$PYTHONPATH"
PYTHONPATH=''
old_ifs="$IFS"
IFS=';'
for pypath in $old_pythonpath; do
case "$pypath" in
?:\\*)
drive=`echo "${pypath}" | head -c 1`
;;
\\*)
# just guess
drive='c'
;;
*)
continue
;;
esac
drive=`echo $drive | tr "A-Z" "a-z"`
newpath=`echo "$pypath" \
| sed -e "y#\\\\\\#/#
s#^${drive}:#/cygdrive/${drive}#i"`
if test -z "$PYTHONPATH"; then
PYTHONPATH="$newpath"
else
PYTHONPATH="${PYTHONPATH}:${newpath}"
fi
done
IFS="$old_ifs"
export PYTHONPATH
;;
esac
fi
Gruss, Andy