update pythonbrew-install

This commit is contained in:
Yuta
2011-05-24 22:38:40 +09:00
parent c0f9d4ed57
commit 0dfc0d38f1
+10 -11
View File
@@ -10,7 +10,6 @@ trim()
trimmed=$1
trimmed="${trimmed#"${trimmed%%[![:space:]]*}"}" # remove leading whitespace characters
trimmed="${trimmed%"${trimmed##*[![:space:]]}"}" # remove trailing whitespace characters
echo $trimmed
}
@@ -48,18 +47,18 @@ if [[ ! -x $CURL ]] ; then
fi
for PYTHON in $PYTHONS ; do
if [[ ! -x $PYTHON ]] ; then
continue
fi
if [[ ! -x $PYTHON ]] ; then
continue
fi
PYTHON_VERSION=`$PYTHON -V 2>&1`
PYTHON_VERSION=${PYTHON_VERSION/"Python "/""}
PYTHON_VERSION_S=`echo $PYTHON_VERSION | sed -e "s/\(^[[:digit:]]\{1,\}.[[:digit:]]\{1,\}\).*/\1/"`
PYTHON_VERSION=`$PYTHON -V 2>&1`
PYTHON_VERSION=${PYTHON_VERSION/"Python "/""}
PYTHON_VERSION_S=`echo $PYTHON_VERSION | sed -e "s/\(^[[:digit:]]\{1,\}.[[:digit:]]\{1,\}\).*/\1/"`
if [[ $PYTHON_VERSION_S = "2.4" ]] || [[ $PYTHON_VERSION_S = "2.5" ]] || [[ $PYTHON_VERSION_S = "2.6" ]] || [[ $PYTHON_VERSION_S = "2.7" ]] ; then
PYTHON_FOUND='1'
break
fi
if [[ $PYTHON_VERSION_S = "2.4" ]] || [[ $PYTHON_VERSION_S = "2.5" ]] || [[ $PYTHON_VERSION_S = "2.6" ]] || [[ $PYTHON_VERSION_S = "2.7" ]] || [[ ${PYTHON_VERSION_S:0:1} = "3" ]] ; then
PYTHON_FOUND='1'
break
fi
done
if [[ $PYTHON_FOUND != '1' ]] ; then
echo "pythonbrew required Python (2.4, 2.5, 2.6 or 2.7)."