Commit c8241573 authored by cclauss's avatar cclauss

Modified to use recommended local, compact syntax

local PYTHON_VERSION=${1:-2.7.8}

Thanks for the tip.  You learn something new every day.
parent ee93719b
...@@ -6,13 +6,7 @@ ...@@ -6,13 +6,7 @@
# Example usage: download_python "2.7.8" # Example usage: download_python "2.7.8"
download_python() download_python()
{ {
PYTHON_VERSION=$1 local PYTHON_VERSION=${1:-2.7.8}
if [ -z $PYTHON_VERSION ]
then
$PYTHON_VERSION="2.7.8"
fi
echo "Building Python $PYTHON_VERSION..." echo "Building Python $PYTHON_VERSION..."
SOURCE_TARBALL="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz" SOURCE_TARBALL="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz"
curl -L $SOURCE_TARBALL | tar xz curl -L $SOURCE_TARBALL | tar xz
......
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