hwtree 713 Bytes
#!/bin/ksh
#
# script to make $ROOT/PR looks like hardware tree by symbolic some $ROOT/HW
# directories
#

# get the environment variables
. ./CHANGEME

# prompt user to make sure we don't do something bad
echo
echo
echo About to make symbolic links in $ROOT/PR
echo to hardware modules in $ROOT/HW
echo
echo If this is the correct tree, type yes to continue, no to quit
read REPLY
if test $REPLY != "yes"
then
        echo QUIT!!!
        exit 0
fi

HWDIRS="cosim hw2 iosim"

# check to make sure $ROOT/HW/* exist

for d in $HWDIRS;
do
	if test ! -d $ROOT/HW/$d
	then
		echo $0: $ROOT/HW/$d does not exist
		exit 0
	fi
done

# make links to from PR to HW
for d in $HWDIRS;
do
	cd $ROOT/PR; ln -s ../HW/$d .
done