~ubuntu-branches/ubuntu/vivid/jaxb/vivid-proposed

« back to all changes in this revision

Viewing changes to tools/bin/schemagen.zip.sh

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2014-09-01 14:26:44 UTC
  • Revision ID: package-import@ubuntu.com-20140901142644-nox3y6t2unq2wxjf
Tags: upstream-2.2.5
ImportĀ upstreamĀ versionĀ 2.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
4
#
 
5
# Copyright (c) 1997-2011 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://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
 
13
# or packager/legal/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 packager/legal/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
# Script to run schemagen
 
44
#
 
45
 
 
46
# Resolve links - $0 may be a softlink
 
47
PRG="$0"
 
48
 
 
49
while [ -h "$PRG" ]; do
 
50
  ls=`ls -ld "$PRG"`
 
51
  link=`expr "$ls" : '.*-> \(.*\)$'`
 
52
  if expr "$link" : '.*/.*' > /dev/null; then
 
53
    PRG="$link"
 
54
  else
 
55
    PRG=`dirname "$PRG"`/"$link"
 
56
  fi
 
57
done
 
58
 
 
59
WEBSERVICES_LIB=$PRG/../../..
 
60
 
 
61
if [ -n "$JAVA_HOME" ]
 
62
then
 
63
    JAVA=$JAVA_HOME/bin/java
 
64
else
 
65
    JAVA=java
 
66
fi
 
67
 
 
68
$JAVA $SCHEMAGEN_OPTS -cp "$WEBSERVICES_LIB/jaxb/lib/jaxb-xjc.jar" com.sun.tools.jxc.SchemaGeneratorFacade "$@"