-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetchIdea.sh
More file actions
29 lines (23 loc) · 829 Bytes
/
fetchIdea.sh
File metadata and controls
29 lines (23 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
if [[ $# -eq 0 ]] ; then
echo 'This script must be called with the version of IDEA to fetch'
echo 'example: ./fetchIdea.sh 13.1.6'
exit 1
fi
ideaVersion=$1
ideaPrimaryVersionID=${ideaVersion%%\..*}
# Get our IDEA dependency
if [ -f ~/Tools/ideaIU-${ideaVersion}.tar.gz ];
then
cp ~/Tools/ideaIU-${ideaVersion}.tar.gz .
else
wget http://download.jetbrains.com/idea/ideaIU-${ideaVersion}.tar.gz && mkdir -p ~/Tools && cp ideaIU-${ideaVersion}.tar.gz ~/Tools/ideaIU-${ideaVersion}.tar.gz
fi
# Unzip IDEA
tar zxf ideaIU-${ideaVersion}.tar.gz
rm -rf ideaIU-${ideaVersion}.tar.gz
# Move the versioned IDEA folder to a known location
ideaPath=$(find . -name 'idea-IU*' | head -n 1)
cp -R ${ideaPath} ./idea-IU
mkdir -p target/dependency/intellij-idea
mv ${ideaPath} target/dependency/intellij-idea