source: osm/applications/editors/josm/plugins/00_tools/jaxb-ri/bin/xjc.sh@ 34408

Last change on this file since 34408 was 34408, checked in by donvip, 6 years ago

see #josm15560, see #josm16047 - fix XJC scripts

  • Property svn:executable set to *
File size: 2.8 KB
Line 
1#!/bin/sh
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4#
5# Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved.
6#
7# The contents of this file are subject to the terms of either the GNU
8# General Public License Version 2 only ("GPL") or the Common Development
9# and Distribution License("CDDL") (collectively, the "License"). You
10# may not use this file except in compliance with the License. You can
11# obtain a copy of the License at
12# https://oss.oracle.com/licenses/CDDL+GPL-1.1
13# or LICENSE.txt. See the License for the specific
14# language governing permissions and limitations under the License.
15#
16# When distributing the software, include this License Header Notice in each
17# file and include the License file at LICENSE.txt.
18#
19# GPL Classpath Exception:
20# Oracle designates this particular file as subject to the "Classpath"
21# exception as provided by Oracle in the GPL Version 2 section of the License
22# file that accompanied this code.
23#
24# Modifications:
25# If applicable, add the following below the License Header, with the fields
26# enclosed by brackets [] replaced by your own identifying information:
27# "Portions Copyright [year] [name of copyright owner]"
28#
29# Contributor(s):
30# If you wish your version of this file to be governed by only the CDDL or
31# only the GPL Version 2, indicate your decision by adding "[Contributor]
32# elects to include this software in this distribution under the [CDDL or GPL
33# Version 2] license." If you don't indicate a single choice of license, a
34# recipient has the option to distribute your version of this file under
35# either the CDDL, the GPL Version 2 or to extend the choice of license to
36# its licensees as provided above. However, if you add GPL Version 2 code
37# and therefore, elected the GPL Version 2 license, then the option applies
38# only if the new code is made subject to such option by the copyright
39# holder.
40#
41
42
43#
44# Make sure that JAXB_HOME and JAVA_HOME are set
45#
46if [ -z "$JAXB_HOME" ]
47then
48 # search the installation directory
49
50 PRG=$0
51 progname=`basename $0`
52 saveddir=`pwd`
53
54 cd "`dirname $PRG`"
55
56 while [ -h "$PRG" ] ; do
57 ls=`ls -ld "$PRG"`
58 link=`expr "$ls" : '.*-> \(.*\)$'`
59 if expr "$link" : '.*/.*' > /dev/null; then
60 PRG="$link"
61 else
62 PRG="`dirname $PRG`/$link"
63 fi
64 done
65
66 JAXB_HOME=`dirname "$PRG"`/..
67
68 # make it fully qualified
69 cd "$saveddir"
70 JAXB_HOME=`cd "$JAXB_HOME" && pwd`
71
72 cd "$saveddir"
73fi
74
75[ `expr \`uname\` : 'CYGWIN'` -eq 6 ] &&
76{
77 JAXB_HOME=`cygpath -w "$JAXB_HOME"`
78}
79
80if [ -n "$JAVA_HOME" ]
81then
82 JAVA="$JAVA_HOME/bin/java"
83else
84 JAVA=java
85fi
86
87exec "$JAVA" $XJC_OPTS -cp "$JAXB_HOME/lib/javax.activation.jar:$JAXB_HOME/lib/jaxb-xjc.jar" com.sun.tools.xjc.XJCFacade "$@"
Note: See TracBrowser for help on using the repository browser.