Created
March 17, 2015 06:01
-
-
Save abn/53ceec0301687ccfc387 to your computer and use it in GitHub Desktop.
Install JetBrains IDEA Community edition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| VERSION=${1:-14.0.3} | |
| #http://download-cf.jetbrains.com/idea/ideaIC-14.0.3.tar.gz | |
| URI=http://download.jetbrains.com/idea/ideaIC-${VERSION}.tar.gz | |
| if [ "$(whoami)" == "root" ]; then | |
| echo "INFO: Installing system-wide" | |
| BASE=/opt/jetbrains | |
| BIN=/usr/bin | |
| else | |
| echo "INFO: Installing for ${USER}" | |
| BASE=${HOME}/opt/jetbrains | |
| BIN_DIR=${HOME}/opt/bin | |
| fi | |
| mkdir --parents "${BASE}" | |
| cd "${BASE}" | |
| TMP_FILE=/tmp/idea.tar.gz | |
| wget -O ${TMP_FILE} ${URI} | |
| tar xvf ${TMP_FILE} | |
| rm -rf ${TMP_FILE} | |
| find ${BASE} -maxdepth 1 -type d -name "idea-IC-*" \ | |
| | sort -ur | head -n 1 \ | |
| | xargs -I {} ln -sf {} ${BASE}/idea | |
| BIN=${BIN_DIR}/idea | |
| cat > ${BIN} << DELIM | |
| #! /usr/bin/env bash | |
| nohup ${BASE}/idea/bin/idea.sh > /dev/null 2>&1 & | |
| DELIM | |
| chmod 755 ${BIN} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
similar script for install or update(auto) jetbrains products like phpstorm, webstorm, IntelliJ Idea and other. + dependencies + non latin hotkeys fixes
https://gist.github.com/zabidok/8418c4f679741f585ac9ce90b16fb8a5