#!/usr/bin/ksh
# =======================================================
# postbuild.sh usage:
#
# $1 = top (where src is)
# $2 = type (retail debug, or both)
# $3 = title (jobname)
# $4 = buildnumber (title.version+p4 change)
# =======================================================
export TOP=$1
export TYPE=$2
export TITLE=$3
export NUM=$4
export RTL=/usr/local/builds/$TITLE.$NUM/retail
export DBG=/usr/local/builds/$TITLE.$NUM/debug
retail() {
if [ ! -d $RTL ]
then
mkdir -p $RTL
fi
cp -r /usr/local/build/samba/* $RTL
cp $TOP/*log /usr/local/builds/$TITLE.$NUM
}
debug() {
if [ ! -d $DBG ]
then
mkdir -p $DBG
fi
}
if [ "$2" = "retail" ]
then
retail
fi
if [ "$2" = "debug" ]
then
debug
fi
if [ "$2" = "both" ]
then
retail
debug
fi