mirror of
https://github.com/kennethreitz-archive/python-build.git
synced 2026-06-05 15:20:16 +00:00
update pythonbrew-install
This commit is contained in:
+10
-11
@@ -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)."
|
||||
|
||||
Reference in New Issue
Block a user