#!/bin/sh

if [ $# -ne 1 ]
then
	echo "usage: lvi <link_filename>"
fi

######## change these to your directories
d1="$LINK_BASE/include/LINK"
d2="$LINK_BASE/src"
######## 

echo 

cd $d1

for i in `ls`
do
	if [ -d $i ]
	then
		cd $i
		if [ -f $1 ]
		then
			vi $1
			exit
		fi
		cd ..
	fi
done

cd $d2

for i in `ls`
do
	if [ -d $i ]
	then
		cd $i
		if [ -f $1 ]
		then
			vi $1 
			exit
		fi
		cd ..
	fi
done
