#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
#
# Because we build more than one copy of perl at the same time we need each
# to have its own copy of the contrib subdirectory so that the concurrent
# builds don't interfere with each other. Rather than duplicating the contents
# of the contrib directory under each version of perl we copy the clearfiles
# care only to do the copy if necessary so as not to cause unnecessary rebuilds.
#
function usage
{
printf 'copy_contrib: usage is <src dir> <dst dir> <module> ...\n'
exit 1
}
# Check arguments.
typeset -r src=$1
typeset -r dst=$2
shift 2
typeset -r modules=$*
typeset -r pwd=$PWD
#
# Make sure all the modules have the necessary clearfiles fetched,
# but only if we have SCCS files (not true for the source product).
#
set -e
set +e
fi
done
cd $pwd
done
#
# Now copy all the clearfiles over to the destination directory, but only if
# the destination file doesn't exist or is older than the source file.
# Teamware bringover and putback warning about them not being in SCCS.
#
# Handle directories.
# Create destination directory if required.
set -e
set +e
fi
# Handle plain files.
set -e
set +e
fi
# Anything else isn't handled.
else
exit 1
fi
done
exit 0