#!/bin/sh

SRC_DIR=/src/paws
BIN_DIR=/src/paws/bin
BUILD_DIR=/hpfloat/srmserve/BUILD
CHECK_TMP_FILE=/tmp/checkempty.tmp
export SRC_DIR BIN_DIR BUILD_DIR CHECK_TMP_FILE

echo "Checking out turnlog"
co -q ${SRC_DIR}/RCS/turnlog.mm,v
echo "Printing turnlog"
#mm turnlog.mm | lp -onroff
echo "Pickup turnlog at printer"
rm -f turnlog.mm

${BIN_DIR}/newcheckempty
if test "`wc -l $CHECK_TMP_FILE`" -ne "0"
then
   echo "Remove files in RCS directories"
   echo "A list of the files is saved in ${CHECK_TMP_FILE}"
else
   echo "Checking out source files and copying them to ${BUILD_DIR}"
   ${BIN_DIR}/newrcs2pws
   ${BIN_DIR}/newaptext
fi
