hwtree
713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/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