#!/bin/sh
#
#    Syntax:  defdirs <file> <dir> 
#

pdir=$2

# This next line quietly handles an error condition.

if [ .$pdir = . ]; then
   exit
fi

if [ $pdir = "." ]; then
   pdir=`pwd`
fi

if [ -f $pdir/$1 ]; then
   topdir=`awk -f $utils/gettopdir.awk $pdir/$1`
   if [ ."$topdir" != . ]; then
      if [ ! -f $ITMPDIR/CommandDir ]; then
         echo $n "$pdir$c" > $ITMPDIR/CommandDir
      fi
      echo $n "$topdir$c" > $ITMPDIR/TopDir
   fi
fi

