#!/bin/sh

###########################################################
#
# sitVersCk.sh 
# Copyright (c) 2005 McAfee, Inc. All Rights Reserved.
#
###########################################################


# This script will see if the StuffIt Engine is installed and if so which version. 
# It will then determine whether the related upgrade should be installed. 
# Installation will be recommended unless a version newer than the VERSION
# specified below is found. 
# If no version is found, Installation is recommended.
# If the same version is found, the installation recommended.
##
##
# Please set the VERSION variable to the version of the engine you're attempting to install.
##
VERSION=8.0.3
echo "This will install if current version is less than or equal to: $VERSION"
##
# Initializes return value biased toward installation
##
let retval=0
##
# Checks for Installed StuffIt Engine
##
if [ -d /usr/local/vscanx ]
then 
	echo "Can install Virex"
else
	echo "Virex is not installed in this machine."
        retval=112
fi

if [ -d /Library/Application\ Support/Virex ]
then 
	echo "Can install Virex"
else
	echo "Virex is not installed in this machine."
        retval=112
fi

echo "The returned value is: $retval"
##
# A returned value of "0" recommends installation.
# A returned value of "1" recommends NO installation.
# This value is passed along as the exit status.
##
exit $retval


