#!/bin/sh
#
#    Syntax:  commandchk <file>
#
#    This script gets called before installation of a command file.
#
#    CMDDIR = where to place final command file.

#    Make sure we have CMDDIR, or have prompted for it. cmdprompt
#    does not let itself get called more than once.

. cmdprompt

if [ -f $ITMPDIR/CommandDir ]; then
   CMDDIR=`cat $ITMPDIR/CommandDir`
fi

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

echo $PATH:$CMDDIR | awk -f $utils/pathvals.awk > $ITMPDIR/PathValues

. $ITMPDIR/PathValues $1
