blob: edfa90b2fccfada5945719125b61e4a74f946bc2 (
plain)
| 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
 | #!/bin/sh
# java-c
# Copyright 1999 Stephane Bortzmeyer.
#           2001 Ola Lundqvist
# Licensed under the GNU GPL.
set -e
repository=/usr/share/java/repository
conf=/etc/java/java-c.conf
javac=`head -1 $conf`
if [ ! -n "$javac" ]
then
	echo "Cannot find a Java compiler in $conf"
	exit 1
fi
defclasspath=`head -2 $conf | tail -1`
if [ -n "$defclasspath" ]
then
    MYCLASSPATH=${defclasspath}
fi
compliant=`head -3 $conf | tail -1`
if [ "xx$compliant" != "xxCOMPLIANT" ]
then
    if [ -n "$MYCLASSPATH" ]
    then
	MYCLASSPATH=${MYCLASSPATH}:$repository
    else
	MYCLASSPATH=$repository
    fi
fi
if [ -n "$CLASSPATH" ]
then
    if [ -n "$MYCLASSPATH" ]
    then
	MYCLASSPATH=${MYCLASSPATH}:${CLASSPATH}
    else
	MYCLASSPATH=${CLASSPATH}
    fi
fi
if [ -n "$MYCLASSPATH" ]
then
    CLASSPATH=$MYCLASSPATH
    export CLASSPATH
    #echo $CLASSPATH
fi
exec "$javac" "$@"
echo "Cannot run $javac (found in $conf)"
exit 1
 |