summaryrefslogtreecommitdiff
path: root/dummy/compiler/java-c
diff options
context:
space:
mode:
authorOla Nordmann <olapc@yahoo.no>2001-10-01 11:50:34 +0000
committerOla Nordmann <olapc@yahoo.no>2001-10-01 11:50:34 +0000
commit3095d2c801e948b90fb34051fb7aff6ae0f949bb (patch)
treeaf2d7f6620166c0cbe21a5d15b9c83a7bdd61de9 /dummy/compiler/java-c
parent307f3a32e64ddd4de7b3e07f38d004c7de8d4a05 (diff)
downloadjava-common-3095d2c801e948b90fb34051fb7aff6ae0f949bb.tar.gz
Moved java-compiler-dummy to java-common.
Diffstat (limited to 'dummy/compiler/java-c')
-rw-r--r--dummy/compiler/java-c60
1 files changed, 60 insertions, 0 deletions
diff --git a/dummy/compiler/java-c b/dummy/compiler/java-c
new file mode 100644
index 0000000..edfa90b
--- /dev/null
+++ b/dummy/compiler/java-c
@@ -0,0 +1,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
+