make/scripts/update_src.sh

Thu, 01 Nov 2012 14:11:50 -0700

author
katleman
date
Thu, 01 Nov 2012 14:11:50 -0700
changeset 336
5ded18a14bcc
parent 286
f50545b5e2f1
permissions
-rw-r--r--

Added tag jdk8-b63 for changeset 86989f702267

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

mercurial