#!/bin/csh -f


set SLOT_NUMBER=$1
set APP_HOME=$2
set SOFT_DIR=$3

source ${APP_HOME}/${SOFT_DIR}${SLOT_NUMBER}/profile/.cshrc

cd $APP_HOME

source def_dps.dat
set x=0
foreach v (`echo $list`)
	if ($v > $x) set x=$v
end

@ x++
set list="${list} $x" 

##############################

echo "set def='${def}'" > def_dps.dat.new
echo "set list='${list}'" >> def_dps.dat.new
grep "#" def_dps.dat >> def_dps.dat.new
echo "#    ${x}  ${SOFT_DIR}${SLOT_NUMBER}    02.1   00   899${SLOT_NUMBER}                                       #" >> def_dps.dat.new
grep "login" def_dps.dat >> def_dps.dat.new
echo "set login${x}='${APP_HOME}/${SOFT_DIR}${SLOT_NUMBER}'" >> def_dps.dat.new

rm -f def_dps.dat
cp -p def_dps.dat.new def_dps.dat

exit 0
##############################
