Modified to use recommended local, compact syntax

local PYTHON_VERSION=${1:-2.7.8}

Thanks for the tip.  You learn something new every day.
This commit is contained in:
cclauss
2014-08-23 17:32:08 +02:00
parent ee93719b79
commit c82415733d
+1 -7
View File
@@ -6,13 +6,7 @@
# Example usage: download_python "2.7.8"
download_python()
{
PYTHON_VERSION=$1
if [ -z $PYTHON_VERSION ]
then
$PYTHON_VERSION="2.7.8"
fi
local PYTHON_VERSION=${1:-2.7.8}
echo "Building Python $PYTHON_VERSION..."
SOURCE_TARBALL="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz"
curl -L $SOURCE_TARBALL | tar xz