-
-
Save humbertodias/4e2eef97e7a29a703618334699c12a3d to your computer and use it in GitHub Desktop.
Install sonar-scanner in linux mint, ubuntu...
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
#!/bin/bash | |
# https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip | |
SONAR_SCANNER_VERSION=4.5.0.2216 | |
cd /tmp || exit | |
echo "Downloading sonar-scanner....." | |
if [ -d "/tmp/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip" ];then | |
sudo rm /tmp/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip | |
fi | |
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip | |
echo "Download completed." | |
echo "Unziping downloaded file..." | |
unzip sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip | |
echo "Unzip completed." | |
rm sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip | |
echo "Installing to opt..." | |
if [ -d "/var/opt/sonar-scanner-$SONAR_SCANNER_VERSION-linux" ];then | |
sudo rm -rf /var/opt/sonar-scanner-$SONAR_SCANNER_VERSION-linux | |
fi | |
sudo mv sonar-scanner-$SONAR_SCANNER_VERSION-linux /var/opt | |
echo "Installation completed successfully." | |
echo "You can use sonar-scanner!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment