travis-racket/install-racket.sh
Greg Hendershott e1d8cbf061 Use -L with curl for download of Racket installer.
To follow redirects, if any.
2014-03-13 16:29:43 -04:00

30 lines
998 B
Bash
Executable File

# IMPORTANT: Your .travis.yml must pipe this to bash (not to sh)!
# In the Travis CI environment a #!/bin/bash shebang here won't help.
set -e
if [[ "$RACKET_VERSION" = "HEAD" ]]; then
URL="http://www.cs.utah.edu/plt/snapshots/current/installers/racket-current-x86_64-linux-precise.sh"
elif [[ "$RACKET_VERSION" = 5.9* ]]; then
URL="http://download.racket-lang.org/installers/${RACKET_VERSION}/racket-${RACKET_VERSION}-x86_64-linux-ubuntu-quantal.sh"
elif [[ "$RACKET_VERSION" = 6.0* ]]; then
URL="http://download.racket-lang.org/installers/${RACKET_VERSION}/racket-${RACKET_VERSION}-x86_64-linux-ubuntu-precise.sh"
else
URL="http://download.racket-lang.org/installers/${RACKET_VERSION}/racket/racket-${RACKET_VERSION}-bin-x86_64-linux-debian-squeeze.sh"
fi
INSTALL="./racket-${RACKET_VERSION}.sh"
echo "Downloading $URL to $INSTALL:"
curl -L -o $INSTALL $URL
echo "Running $INSTALL to install Racket:"
chmod u+rx "$INSTALL"
sudo "$INSTALL" <<EOF
no
/usr/racket
# EOF
exit 0