Skip to content

Instantly share code, notes, and snippets.

@mrjones2014
Created November 10, 2017 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrjones2014/91ad70384501d4a6c792238560cc768d to your computer and use it in GitHub Desktop.
Save mrjones2014/91ad70384501d4a6c792238560cc768d to your computer and use it in GitHub Desktop.
install jetbrains toolbox app
#!/bin/bash
[ $(id -u) != "0" ] && exec sudo "$0" "$@"
echo -e " \e[94mInstalling Jetbrains Toolbox\e[39m"
echo ""
URL="https://download.jetbrains.com/toolbox/jetbrains-toolbox-1.3.2421.tar.gz"
FILE=$(basename ${URL})
DEST=$PWD/$FILE
echo ""
echo -e "\e[94mDownloading Toolbox files \e[39m"
echo ""
wget -cO ${DEST} ${URL} --read-timeout=5 --tries=0
echo ""
echo -e "\e[32mDownload complete!\e[39m"
echo ""
DIR="/opt/jetbrains-toolbox"
echo ""
echo -e "\e[94mInstalling to $DIR\e[39m"
echo ""
if mkdir ${DIR}; then
tar -xzf ${DEST} -C ${DIR} --strip-components=1
fi
chmod -R +rwx ${DIR}
touch ${DIR}/jetbrains-toolbox.sh
echo "#!/bin/bash" >> $DIR/jetbrains-toolbox.sh
echo "$DIR/jetbrains-toolbox" >> $DIR/jetbrains-toolbox.sh
ln -s ${DIR}/jetbrains-toolbox.sh /usr/local/bin/jetbrains-toolbox
chmod -R +rwx /usr/local/bin/jetbrains-toolbox
echo ""
rm ${DEST}
echo -e "\e[32mDone.\e[39m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment