Last active
March 8, 2019 20:14
-
-
Save dzuluaga/80df9a5316b56c19da982054e335468a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Replaces the current existing of Gradle with 5.2.1 | |
# Run this script directly from the command line | |
# | |
# $ curl "https://gist.githubusercontent.com/dzuluaga/80df9a5316b56c19da982054e335468a/raw/update-gradle-cloud-shell.sh?$(date +%s)" | sudo bash | |
echo 'Downloading Gradle...' | |
curl https://downloads.gradle.org/distributions/gradle-5.2.1-bin.zip -o gradle-5.2.1-bin.zip | |
echo 'Removing gradle from default location /opt...' | |
sudo rm -rf /opt/gradle | |
echo 'Unzipping Gradle...' | |
sudo unzip gradle-5.2.1-bin.zip -d /opt | |
echo 'Renaming Gradle directory...' | |
sudo mv /opt/gradle-5.2.1 /opt/gradle | |
echo 'Update PATH' | |
export PATH=$PATH:/opt/gradle/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment