Created
April 11, 2018 11:02
-
-
Save menasheh/71f10dada544abe9b039edcc159a6de1 to your computer and use it in GitHub Desktop.
Jetbrains Toolbox Installer for 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 | |
if ! which jetbrains-toolbox &> /dev/null ; then | |
sudo apt-get install dos2unix | |
md_tburl=$(curl -I "https://data.services.jetbrains.com/products/download?code=TBA&platform=linux" | dos2unix | grep Location: | cut -d" " -f2) | |
md_tbfile=$(echo $md_tburl | cut -d/ -f5 | cut -d. -f1-3) | |
cd ~/Downloads/ || exit 1 | |
wget -c $md_tburl || exit "Could not download Jetbrains Toolbox." | |
tar -xzvf $md_tbfile.tar.gz | |
sudo cp $md_tbfile/jetbrains-toolbox /usr/bin/jetbrains-toolbox | |
jetbrains-toolbox && | |
rm -rf $md_tbfile | |
else | |
echo "Jetbrains Toolbox already installed!" | |
jetbrains-toolbox & | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment