-
Notifications
You must be signed in to change notification settings - Fork 20
/
idea.in
67 lines (56 loc) · 1.25 KB
/
idea.in
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
paths="
/usr/lib/jvm/java-8-oracle
/usr/lib/jvm/java-8-openjdk
/usr/lib/jvm/java-8-openjdk-amd64
/usr/lib/jvm/java-7-openjdk
/usr/lib/jvm/java-7-openjdk-amd64
/usr/jdk/instances/jdk1.7.0
/usr/jdk/instances/jdk1.6.0
/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-6-openjdk
/usr/lib/jvm/java-6-openjdk-amd64
/usr/jdk/instances/jdk1.5.0
/usr/lib/jvm/java-5-sun"
if [ -r /etc/default/idea ]
then
. /etc/default/idea
fi
if [ -z "$JDK_HOME" ]
then
for path in $paths
do
if [ -x $path/bin/java ]
then
JDK_HOME=$path
break
fi
done
fi
if [ -z "$JDK_HOME" ]
then
echo "Could not find a suitable JDK installation amongst:" >/dev/stderr
for path in $paths
do
echo $path >/dev/stderr
done
echo "Either install a JDK in one of those locations or configure JDK_HOME in /etc/default/idea:" >/dev/stderr
exit 1
fi
echo "JDK_HOME=$JDK_HOME"
export JDK_HOME
if [ -z "$IDEA_VM_OPTIONS" ]
then
if [ -r "$HOME/.idea.vmoptions" ]
then
IDEA_VM_OPTIONS="$HOME/.idea.vmoptions"
export IDEA_VM_OPTIONS
else
if [ -r "/etc/intellij-idea/idea.vmoptions" ]
then
IDEA_VM_OPTIONS="/etc/intellij-idea/idea.vmoptions"
export IDEA_VM_OPTIONS
fi
fi
fi
exec /usr/share/jetbrains/intellij-idea/bin/idea.sh "$@"