Skip to content

Instantly share code, notes, and snippets.

@abn
Created March 17, 2015 06:01
Show Gist options
  • Select an option

  • Save abn/53ceec0301687ccfc387 to your computer and use it in GitHub Desktop.

Select an option

Save abn/53ceec0301687ccfc387 to your computer and use it in GitHub Desktop.
Install JetBrains IDEA Community edition
#!/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}
@zabidok

zabidok commented Sep 13, 2017

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment