#!/bin/sh
# generic configure script
umask 002

# find $PROD_DIR
eval PROD_DIR=\$`echo $UPS_PROD_NAME | tr '[a-z]' '[A-Z]'`_DIR

. $PROD_DIR/ups/Version

# make sure we have a products link directory
mkdir -p /usr/local/products/$PROD_NAME > /dev/null 2>&1 || true
if cd /usr/local/products/$PROD_NAME
then
	# make the link
	rm -f $PROD_VERSION
	ln -s $PROD_DIR $PROD_VERSION
else
	# can't do it for some reason...
	echo "Notice: Unable to create /usr/local/products/$PROD_NAME/$PROD_VERSION link."
	echo "        Some functionality may be lost."
fi 
unset PROD_DIR
exit 0
