Commit 877ccdfb authored by Chris McDonough's avatar Chris McDonough

If the target version is not found, use the first "most acceptable" version...

If the target version is not found, use the first "most acceptable" version found instead of the last.
parent 98066e6c
#!/bin/sh #!/bin/sh
# Zope configure script # Zope configure script
# $Id: configure,v 1.6 2003/06/10 17:40:39 fdrake Exp $ # $Id: configure,v 1.7 2003/06/13 15:42:25 chrism Exp $
# $Revision: 1.6 $ # $Revision: 1.7 $
##################################################################### #####################################################################
# BEGIN EDITABLE PARAMETERS # # BEGIN EDITABLE PARAMETERS #
...@@ -16,10 +16,10 @@ ZOPE_VERS=2.7 ...@@ -16,10 +16,10 @@ ZOPE_VERS=2.7
TARGET="2.2.3" TARGET="2.2.3"
# Order a list of "acceptable" python version numbers (as returned by # Order a list of "acceptable" python version numbers (as returned by
# sys.version) below in "best" to "worst" order. Up to six # sys.version) below in "best" to "worst" order, not including the
# acceptable python versions are allowed. Do not include the target # target version. Up to six acceptable python versions are allowed.
# version number in this list. # Do not include the target version number in this list!
ACCEPTABLE="2.3 2.3b1 2.3a1 2.3a0 2.2.2" ACCEPTABLE="2.2.2 2.3 2.3b1 2.3a1 2.3a0"
# provide the executable names for all the acceptable versions # provide the executable names for all the acceptable versions
# (and the target version) below # (and the target version) below
...@@ -60,6 +60,7 @@ get_python() { ...@@ -60,6 +60,7 @@ get_python() {
IFS=":" IFS=":"
FOUND="" FOUND=""
VERSION="" VERSION=""
FOUNDLIST=""
echo "Testing for an acceptable Python interpreter..." echo "Testing for an acceptable Python interpreter..."
echo echo
for DIR in $PATH; do for DIR in $PATH; do
...@@ -80,7 +81,19 @@ get_python() { ...@@ -80,7 +81,19 @@ get_python() {
i=1; i=1;
for ACC in $ACCEPTABLE; do for ACC in $ACCEPTABLE; do
let "i = i + 1" let "i = i + 1"
for SLOT in $FOUNDLIST; do
if [ $SLOT == $i ]; then
# slot "i" already populated. This means we've
# already found this particular version of
# python. Continue the for ACC in
# $ACCEPTABLE loop and don't overwrite the
# one we already found (interpreters first
# on the path win).
continue 2
fi
done
if [ "$VERSION" = "$ACC" ]; then if [ "$VERSION" = "$ACC" ]; then
FOUNDLIST="$FOUNDLIST $i"
eval "FOUND$i=$FULL" eval "FOUND$i=$FULL"
eval "FOUNDVERSION$i=$VERSION" eval "FOUNDVERSION$i=$VERSION"
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment