#! /bin/ksh
if [ -z "$1" -o ! -d $1/dist ]; then
  echo "Usage: doit path_to_dist"
  exit 1
fi

if [ ! -d $1/input ]; then
  mkdir $1/input
fi

if [ ! -d $1/dist/cntl ]; then
  mkdir $1/dist/cntl
  cp -f ccs cqs need646 needMP3 cmpnt.desc $1/dist/cntl
fi

if [ ! -d $1/dist/usr/share ]; then
  T=`pwd`/docview.tar
  (cd $1/dist/usr; tar xf $T)
fi

mkcdmt -d $1 -P Squid -D "Squid Web Proxy Cache 2.5.5" -V 5.0.7Ga -f -p squid.mkcdmt
