#!/bin/sh
#* ----------------------------------------------------------------------
#*               Proprietary and Confidential Information
#*
#* This material contains, and is part of a computer software program
#* which is, proprietary and confidential information owned by COMPUTER
#* ASSOCIATES INTERNATIONAL, INC.  The program, including this material,
#* may not be duplicated, disclosed or reproduced in whole or in part for
#* any purpose without the express written authorization of COMPUTER
#* ASSOCIATES. All authorized reproductions must be marked with this
#* legend.
#*
#*                          Copyright (c) 1992-2005
#*             Computer Associates International, Incorporated
#*                          All rights reserved
#*
#* ----------------------------------------------------------------------
#*  SCCS Module Control Stamp
#* ----------------------------------------------------------------------
#
#* "@(#)clean_path	1.6  03/22/05 17:54:11"
#* "Copyright (C) 1992-2005 Computer Associates International, Inc.  All rights reserved."
#
# This file sourced by $CAIGLBL0000/scripts/envset.
#* 08/16/95  misjo01  added systype check for SunOS_i386
#* 12/06/95  smiga01  added systype check for SIEMENS
 
if [ "$CAIGLBL0000" = '' ]; then
	return 0
fi

 
SYSTYPE=`$CASHCOMP/bin/casystyp`
if [ $SYSTYPE = SunOS -o $SYSTYPE = SunOS_i386 -o $SYSTYPE = SIEMENS ]; then
	# move /usr/ucb to end of path, if present
	in_path=0
	tp=`echo $PATH | tr ':' ' '`
	PATH=''
	for d in $tp
	do
		if [ "$d" = "/usr/ucb" -o "$d" = "/usr/ucb/" ]; then
                	in_path=1
			continue
		fi
		if [ "$PATH" = '' ]; then
			PATH="$d"
		else
			PATH=$PATH:"$d"
		fi
	done
	if [ $in_path -eq 1 ];then
	   PATH=$PATH:/usr/ucb
        elif [ $SYSTYPE = SIEMENS ]; then
	   if [ -d /usr/ucb ]; then
	   PATH=$PATH:/usr/ucb
	   fi
	fi
	export PATH
fi
