bfudrop.sh revision 4e5b757fbcf21077677360be274461dcd9064106
#
# 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 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
#
# Wrap up a set of BFU archives as a tarball, including binary license
# files.
# usage: bfudrop build-id
# where "build-id" is the build identifier in the archives directory
# of the current workspace (e.g., "nightly").
#
usage="bfudrop build-id"
echo $*
exit 1
}
#
# Directory that we assemble everything in. Everything goes into
# $subdir so that it unpacks cleanly.
#
stagedir=$(mktemp -dt bfudropXXXXX)
#
# Generate README.BFU-ARCHIVES.$isa from boilerplate and the contents
# of the bfu archives.
# usage: cd archivedir; mkreadme destdir
#
destdir=$1
for f in *; do
#
# The cpio table of contents includes directories, and
# we just want files. So unpack the cpio file into a
# temp directory, do a find(1) to get the table of
# contents, and remove the temp directory.
#
mkdir -p $scratchdir || fail "can't create $scratchdir."
case $f in
*.Z|*.bz2)
fail "$f: compression type not supported"
;;
esac
$cat $f | (cd $scratchdir; cpio -id)
if [ $? -ne 0 ]; then
fail "can't extract $f"
fi
done
}
if [ $# -ne 1 ]; then
fi
build=$1
cd $CODEMGR_WS
# copy archives
# Insert binary license files.
fail "Can't add BINARYLICENSE.txt"
fail "Can't add THIRDPARTYLICENSE.BFU-ARCHIVES."