Skip to content

Instantly share code, notes, and snippets.

@menasheh
Created April 11, 2018 11:02
Show Gist options
  • Save menasheh/71f10dada544abe9b039edcc159a6de1 to your computer and use it in GitHub Desktop.
Save menasheh/71f10dada544abe9b039edcc159a6de1 to your computer and use it in GitHub Desktop.
Jetbrains Toolbox Installer for Ubuntu
#!/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