ohair@286: # ohair@286: # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ohair@286: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ohair@286: # ohair@286: # This code is free software; you can redistribute it and/or modify it ohair@286: # under the terms of the GNU General Public License version 2 only, as ohair@286: # published by the Free Software Foundation. Oracle designates this ohair@286: # particular file as subject to the "Classpath" exception as provided ohair@286: # by Oracle in the LICENSE file that accompanied this code. ohair@286: # ohair@286: # This code is distributed in the hope that it will be useful, but WITHOUT ohair@286: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ohair@286: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ohair@286: # version 2 for more details (a copy is included in the LICENSE file that ohair@286: # accompanied this code). ohair@286: # ohair@286: # You should have received a copy of the GNU General Public License version ohair@286: # 2 along with this work; if not, write to the Free Software Foundation, ohair@286: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ohair@286: # ohair@286: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@286: # or visit www.oracle.com if you need additional information or have any ohair@286: # questions. ohair@286: # ohair@286: ohair@286: # This script was used to copy the former drop source bundle source into ohair@286: # the repository. Exists as a form of documentation. ohair@286: ohair@286: curdir="`(cd . && pwd)`" ohair@286: ohair@286: # Whitespace normalizer script is in the top repository. ohair@286: normalizer="perl ${curdir}/../make/scripts/normalizer.pl" ohair@286: ohair@286: # Locations for bundle and root of source tree ohair@286: tmp=/tmp ohair@286: srcroot=${curdir}/src ohair@286: mkdir -p ${srcroot} ohair@286: ohair@286: # Bundle information ohair@286: drops_dir="/java/devtools/share/jdk8-drops" ohair@286: url1="http://download.java.net/glassfish/components/jax-ws/openjdk/jdk8" ohair@286: bundle1="jdk8-jaxws-2_2-SNAPSHOT-2012_01_11-patched.zip" ohair@286: srcdir1="${srcroot}/share/jaxws_classes" ohair@286: url2="http://download.java.net/glassfish/components/jax-ws/openjdk/jdk8" ohair@286: bundle2="jdk8-jaf-2011_07_22.zip" ohair@286: srcdir2="${srcroot}/share/jaf_classes" ohair@286: ohair@286: # Function to get a bundle and explode it and normalize the source files. ohair@286: getBundle() # drops_dir url bundlename bundledestdir srcrootdir ohair@286: { ohair@286: # Get the bundle from drops_dir or downloaded ohair@286: mkdir -p $4 ohair@286: rm -f $4/$3 ohair@286: if [ -f $1/$3 ] ; then ohair@286: echo "Copy over bundle: $1/$3" ohair@286: cp $1/$3 $4 ohair@286: else ohair@286: echo "Downloading bundle: $2/$3" ohair@286: (cd $4 && wget $2/$3) ohair@286: fi ohair@286: # Fail if it does not exist ohair@286: if [ ! -f $4/$3 ] ; then ohair@286: echo "ERROR: Could not get $3" ohair@286: exit 1 ohair@286: fi ohair@286: # Wipe it out completely ohair@286: echo "Cleaning up $5" ohair@286: rm -f -r $5 ohair@286: mkdir -p $5 ohair@286: echo "Unzipping $4/$3" ohair@286: ( cd $5 && unzip -q $4/$3 && mv src/* . && rmdir src && rm LICENSE ) ohair@286: # Run whitespace normalizer ohair@286: echo "Normalizing the sources in $5" ohair@286: ( cd $5 && ${normalizer} . ) ohair@286: # Delete the bundle and leftover files ohair@286: rm -f $4/$3 $5/filelist ohair@286: } ohair@286: ohair@286: # Process the bundles. ohair@286: getBundle "${drops_dir}" "${url1}" "${bundle1}" ${tmp} ${srcdir1} ohair@286: getBundle "${drops_dir}" "${url2}" "${bundle2}" ${tmp} ${srcdir2} ohair@286: echo "Completed bundle extraction." ohair@286: echo " " ohair@286: ohair@286: # Appropriate Mercurial commands needed to run: ohair@286: echo "Run: hg addremove src" ohair@286: echo "Run: ksh ../make/scripts/webrev.ksh -N -o ${HOME}/webrev" ohair@286: echo "Get reviewer, get CR, then..." ohair@286: echo "Run: hg commit" ohair@286: