Skip to content

Instantly share code, notes, and snippets.

@ssledz
Created August 26, 2019 14:59
Show Gist options
  • Save ssledz/4af248ea31a86038c9992b20033b8bef to your computer and use it in GitHub Desktop.
Save ssledz/4af248ea31a86038c9992b20033b8bef to your computer and use it in GitHub Desktop.
Update Intellj Idea from .tar.gz, using symlink
#!/bin/bash
IDEA=`tar -tzf $1 | head -1 | cut -f1 -d"/"`
sudo tar -xf $1 -C /opt/
sudo chown $(whoami):$(whoami) /opt/$IDEA -R
sudo rm /opt/idea-IU
sudo ln -s /opt/$IDEA /opt/idea-IU
sudo chown $(whoami):$(whoami) /opt/idea-IU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment