#!/bin/sh

DIR=/u/src/openserver/db
ODIR=/u/src/openserver/Handoffs
PDIR=postgresql-7.4.2De
OUT=$ODIR/$PDIR.cpio.Z

cd $DIR

rm -f $OUT
ADIRS=
for i in cntl etc
do
    [ -d $PDIR/$i ] && ADIRS="$PDIR/$i $ADIRS"
done

/bin/find $PDIR/cdmt.config $PDIR/input $PDIR/usr $ADIRS \
          -depth -print | /bin/cpio -oc | /usr/bin/compress -H > $OUT
