#!/bin/sh
# $Id: t-cdb-1.sh,v 1.1 2007/02/26 02:09:53 ca Exp $
#
# test program for cdb: creates directory structure and then invokes
# t-cdb-0 with various -b parameters (and without).

test -s stop && exit 1              

SUB=sub

# create queue directories
for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F
do
  if test -d ${i}
  then
    rm -f ${i}/?00*
  else
    mkdir ${i}
  fi
done

ERRS=0
DIR=`pwd`
DIRSUB=`pwd`/${SUB}

if ./t-cdb-1
then
  :
else
  ERRS=`expr ${ERRS} + 1 `
fi

# delete queue directories
rmdir [0-9A-F]

exit ${ERRS}


syntax highlighted by Code2HTML, v. 0.9.1