blob: 7ff3359b8df0a0ed775bce9442f24dd19b8334a1 (
plain) (
blame)
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
|
#!/bin/sh
# Aladin Bourne shell launcher
# P.Fernique [CDS] - F.Ochsenbein [CDS]
# V1.1 - oct 2010
# V1.0 - april 2009
# JAVA memory max allocation (in Mb)
mem=1024
# Via a symbolic link ?
prog=$0
while test -h $prog; do
prog1=`ls -l $prog | awk '{print $NF}'`
if test `expr $prog1 : /` -gt 0; then # Absolute symlink
prog="$prog1"
else
prog=`dirname $prog`/$prog1 # Relative symlink
fi
done
# Aladin launch
xterm -e java -Xmx${mem}m -jar `dirname $prog`/Aladin.jar -script="setconf Dir=`pwd`;" $*
res=$?
# Pb1: Aladin.jar not found
if [ $res = 1 ]; then
echo "Aladin and Aladin.jar must be in the same directory"
#Pb 2: JAVA not jound
else
if [ $res = 127 ]; then
jvminstall="http://www.java/download"
browser="mozilla firefox netscape"
echo "Java Runtime environment not found"
echo "=> Fix your path or install it ($jvminstall)"
for w in $browser; do
$w -remote openURL\($jvminstall\) 2> /dev/null
if [ $? = 0 ]; then
exit 0
fi
done
for w in $browser; do
$w $jvminstall 2> /dev/null
if [ $? = 0 ]; then
exit 0
fi
done
fi
fi
|