#!/bin/sh
#

if [ $# -lt 4 ]
then
    echo "Usage: $0 [old install] [install scripts] [destination] [audit]"
fi

TEKXPBOOT=$3/boot
TEKXPCONFIG=$3/config

if [ ! -d $1 ]
then
    echo "Old Quick Install Directory $1 does not exist"
    exit 0
fi

DATE=`date +%m%d%y%H%M`

# For now just copy the old xp.cnf to the new boot area
if [ -d "$3/tekxp/boot/config" ]
then
    if [ -f "$1/XP/xp.cnf" ]
    then
	if [ -f $3/tekxp/boot/config/xp.cnf ]
	then
    	    mv $3/tekxp/boot/config/xp.cnf $3/tekxp/boot/config/xp.cnf.$DATE
    	fi
    	cp $1/XP/xp.cnf $3/tekxp/boot/config
	echo "Move xp.cnf from $1/XP to $3/tekxp/boot/config" >> $4
    fi
else
    echo "Cannot find new configuration directory: $3/tekxp/boot/config"
fi

