#!/usr/bin/env bash set -eou pipefail # Version number VERSION="2023.1.2" # Download https://download.jetbrains.com/idea/ideaIC-${VERSION}.tar.gz curl -L -o /tmp/ideaIC-${VERSION}.tar.gz https://download.jetbrains.com/idea/ideaIC-${VERSION}.tar.gz # Extract to /usr/opt mkdir -p /usr/opt tar -xzf /tmp/ideaIC-${VERSION}.tar.gz -C /usr/opt # Find the full path to the IntelliJ directory IDEA_PATH=$(ls -d /usr/opt/idea-IC-*) # Create .desktop file cat > /tmp/intellij.desktop <