#!/bin/sh
#
# linkReleaseToVendor - Creates a symbolic link using "uname -r" to vendors
#                       distribution directory.
#
# Currently only for RedHat


if [ -f /etc/redhat-release ]
then

	RedHat_Distro=`cat /etc/redhat-release | sed 's/.*release //' | awk '{print $1}'`
	KernelVersion=`uname -r`

	if [ -d ./RedHat/$RedHat_Distro  ]
	then
		ln -s ./RedHat/$RedHat_Distro $KernelVersion
	else
	    echo "Warning: Can't find the specific RedHat distribution X resource directory."
	    echo "Warning: Using the latest available as the default, you may want to"
	    echo "Warning: edit the X resource file after installation is complete."

	    ln -s ./RedHat/Latest $KernelVersion

	    sleep 4
	fi

else
	echo "Warning: Can't determine best X resource file for your Linux distribution"
	echo "Warning: you may want to edit the installed X resource file"
	sleep 5
fi
