make/scripts/update_src.sh

Fri, 04 Oct 2013 16:21:34 +0100

author
mkos
date
Fri, 04 Oct 2013 16:21:34 +0100
changeset 408
b0610cd08440
parent 286
f50545b5e2f1
permissions
-rw-r--r--

8025054: Update JAX-WS RI integration to 2.2.9-b130926.1035
Reviewed-by: chegar

ohair@286 1 #
ohair@286 2 # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
ohair@286 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@286 4 #
ohair@286 5 # This code is free software; you can redistribute it and/or modify it
ohair@286 6 # under the terms of the GNU General Public License version 2 only, as
ohair@286 7 # published by the Free Software Foundation. Oracle designates this
ohair@286 8 # particular file as subject to the "Classpath" exception as provided
ohair@286 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@286 10 #
ohair@286 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@286 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@286 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@286 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@286 15 # accompanied this code).
ohair@286 16 #
ohair@286 17 # You should have received a copy of the GNU General Public License version
ohair@286 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@286 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@286 20 #
ohair@286 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@286 22 # or visit www.oracle.com if you need additional information or have any
ohair@286 23 # questions.
ohair@286 24 #
ohair@286 25
ohair@286 26 # This script was used to copy the former drop source bundle source into
ohair@286 27 # the repository. Exists as a form of documentation.
ohair@286 28
ohair@286 29 curdir="`(cd . && pwd)`"
ohair@286 30
ohair@286 31 # Whitespace normalizer script is in the top repository.
ohair@286 32 normalizer="perl ${curdir}/../make/scripts/normalizer.pl"
ohair@286 33
ohair@286 34 # Locations for bundle and root of source tree
ohair@286 35 tmp=/tmp
ohair@286 36 srcroot=${curdir}/src
ohair@286 37 mkdir -p ${srcroot}
ohair@286 38
ohair@286 39 # Bundle information
ohair@286 40 drops_dir="/java/devtools/share/jdk8-drops"
ohair@286 41 url1="http://download.java.net/glassfish/components/jax-ws/openjdk/jdk8"
ohair@286 42 bundle1="jdk8-jaxws-2_2-SNAPSHOT-2012_01_11-patched.zip"
ohair@286 43 srcdir1="${srcroot}/share/jaxws_classes"
ohair@286 44 url2="http://download.java.net/glassfish/components/jax-ws/openjdk/jdk8"
ohair@286 45 bundle2="jdk8-jaf-2011_07_22.zip"
ohair@286 46 srcdir2="${srcroot}/share/jaf_classes"
ohair@286 47
ohair@286 48 # Function to get a bundle and explode it and normalize the source files.
ohair@286 49 getBundle() # drops_dir url bundlename bundledestdir srcrootdir
ohair@286 50 {
ohair@286 51 # Get the bundle from drops_dir or downloaded
ohair@286 52 mkdir -p $4
ohair@286 53 rm -f $4/$3
ohair@286 54 if [ -f $1/$3 ] ; then
ohair@286 55 echo "Copy over bundle: $1/$3"
ohair@286 56 cp $1/$3 $4
ohair@286 57 else
ohair@286 58 echo "Downloading bundle: $2/$3"
ohair@286 59 (cd $4 && wget $2/$3)
ohair@286 60 fi
ohair@286 61 # Fail if it does not exist
ohair@286 62 if [ ! -f $4/$3 ] ; then
ohair@286 63 echo "ERROR: Could not get $3"
ohair@286 64 exit 1
ohair@286 65 fi
ohair@286 66 # Wipe it out completely
ohair@286 67 echo "Cleaning up $5"
ohair@286 68 rm -f -r $5
ohair@286 69 mkdir -p $5
ohair@286 70 echo "Unzipping $4/$3"
ohair@286 71 ( cd $5 && unzip -q $4/$3 && mv src/* . && rmdir src && rm LICENSE )
ohair@286 72 # Run whitespace normalizer
ohair@286 73 echo "Normalizing the sources in $5"
ohair@286 74 ( cd $5 && ${normalizer} . )
ohair@286 75 # Delete the bundle and leftover files
ohair@286 76 rm -f $4/$3 $5/filelist
ohair@286 77 }
ohair@286 78
ohair@286 79 # Process the bundles.
ohair@286 80 getBundle "${drops_dir}" "${url1}" "${bundle1}" ${tmp} ${srcdir1}
ohair@286 81 getBundle "${drops_dir}" "${url2}" "${bundle2}" ${tmp} ${srcdir2}
ohair@286 82 echo "Completed bundle extraction."
ohair@286 83 echo " "
ohair@286 84
ohair@286 85 # Appropriate Mercurial commands needed to run:
ohair@286 86 echo "Run: hg addremove src"
ohair@286 87 echo "Run: ksh ../make/scripts/webrev.ksh -N -o ${HOME}/webrev"
ohair@286 88 echo "Get reviewer, get CR, then..."
ohair@286 89 echo "Run: hg commit"
ohair@286 90

mercurial