Skip to content

Instantly share code, notes, and snippets.

@Eldar7
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eldar7/ce277f6e90a1466f2c41 to your computer and use it in GitHub Desktop.
Save Eldar7/ce277f6e90a1466f2c41 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://gist.githubusercontent.com/Eldar7/ce277f6e90a1466f2c41/raw/install_idea_13.1.3.sh
# chmod u+x install_idea_13.1.3.sh
# sudo ./install_idea_13.1.3.sh
apt-get install openjdk-7-jdk
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
if [ -e ideaIC-13.1.3.tar.gz ]; then
echo "Good! 'ideaIC-13.1.3.tar.gz' already exists. Skipping download."
else
wget http://download.jetbrains.com/idea/ideaIC-13.1.3.tar.gz
fi
if [ -d /opt/idea-IC-135.909 ]; then
echo "'/opt/idea-IC-135.909' already exists. May be you have already installed this IDEA?"
else
tar -xvzf ideaIC-13.1.3.tar.gz -C /opt
chmod -R +r /opt/idea-IC-135.909/
touch /usr/bin/IDEA
chmod 755 /usr/bin/IDEA
echo "#!/bin/sh
export IDEA_HOME=\"/opt/idea-IC-135.909/bin\"
\$IDEA_HOME/idea.sh \$*" > /usr/bin/IDEA
touch /usr/share/applications/IDEA.desktop
echo "[Desktop Entry]
Encoding=UTF-8
Name=intellj IDEA
Comment=Intellij IDEA IDE
Exec=IDEA
Icon=/opt/idea-IC-135.909/bin/idea.png
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true" > /usr/share/applications/IDEA.desktop
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment