Skip to content

Instantly share code, notes, and snippets.

@jeremyBanks
Created September 19, 2008 04:55
Show Gist options
  • Save jeremyBanks/11542 to your computer and use it in GitHub Desktop.
Save jeremyBanks/11542 to your computer and use it in GitHub Desktop.
[2010-01] a script downloading python from svn, they're moving off that
#!/bin/bash
version="${1:-"3.0"}"
release="${2:-"rc1"}"
repository="http://svn.python.org/projects/python/r${version//./}"
directory="python$version$release"
NUL="/dev/null"
if python$version --version &> "$NUL"; then
echo -n "Current $version-series release installed: "
python$version --version
echo
fi
echo "Installing Python $version$release"
echo
echo "Downloading release through Subversion..."
if svn co "$repository" "$directory" > "$NUL"; then
cd "$directory"
if (./configure; make) > "$NUL"; then
echo "altinstalling: requires sudo"
sudo make altinstall
else
echo "Build or configure failed."
fi
cd ..
else
echo "Download failed."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment