#
# usage:        getver.sh
#
# abstract:     This Bourne Shell script returns the version string
#		for the object.
#
# note(s):      1. This routine must be called using a . (period)
#
# Copyright (c) 1994 by The MathWorks, Inc.
# $Revision: 1.4 $  $Date: 1994/03/23 21:45:54 $
#----------------------------------------------------------------------------
#
# Assume the following variables from the environment.
#
#    1. Object = a string from the set {"toolbox", . . .}
#    2. Location = path relative to the MATLAB root directory of the object
#
# Returns:
#
#    3. Version = a string
#  
#
    if [ "$Object" = "toolbox" ]; then
#
# toolbox: returns field 3 and 4 separated by a blank from line 2 of
#	   $Location/Contents.m if it exists.
#
	if [ -f $Location/Contents.m ]; then
	    Version=`cat $Location/Contents.m | awk '
			NR == 2 { print $3, $4; exit}'`
	else
	    Version=""
	fi
    else
	Version=""
    fi
