make_release_packages revision 1003
#
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
#
# Create and fill a package staging area for X
#
# This script should be run from the base of the build tree.
#
# Arguments:
# -v Enable verbose mode
# -p <publisher> Set publisher name in built repo to <publisher>
#
# Make sure that we aren't affected by the personal environment of
# whoever is running this script
export PATH
progname="$0"
function fatal_error
{
print -u2 "${progname}: ERROR: $*"
exit 1
}
# Path to directory in build tree containing build tools
set -- $(getopt p:v $*)
if [ $? != 0 ] ; then
exit 2
fi
for i in $* ; do
case $i in
-v) VERBOSE_FLAGS="-v"; shift;;
esac
done
if [[ -z "${XNV_BUILDNUM}" ]] ; then
# Get build version from hg by searching for most recent tag matching nv_*
if [[ -z "${BUILD_TAG}" ]] ; then
fatal_error "BUILD_TAG could not be found from hg_log"
fi
XNV_BUILDNUM="${BUILD_TAG}"
fi
print "Building packages for X Consolidation, Nevada build ${XNV_BUILDNUM}"
# Remove old packages
XMAKE="${BUILD_TOOLS}/xmake ${VERBOSE_FLAGS} -k"
cd pkg
print "Result log is in ${LOG}"
"${BUILD_TOOLS}/find-build-errors" -s "${LOG}"
"${BUILD_TOOLS}/find-build-errors" -s "${CHECK_LOG}"
exit 0