#!/bin/csh -f
# Determine executable name collisions with Radiance 3.5
# Assume no one else has a program named this:
echo path was \( $path \)
set testp=macbethcal
while (1)
	set mbc=`which $testp`
	if ( $status ) then
		break
	endif
	set radp="$mbc:h"
	set newp=""
	foreach i ($path:q)
		if ("$i" != "$radp") then
			set newp=($newp:q "$i")
		endif
	end
	set path=($newp:q)
end
echo path changed to \( $path \)
echo Conflicting executables on `uname -a`
foreach i ( 3ds2mgf arch2rad bgraph calc cnt compamb cv dayfact \
debugcal dev dgraph dmake ev falsecolor findglare gcomp genbackg \
genblinds genbox gencat genclock genprism genrev genrhgrid gensky \
gensurf genworm getbbox getinfo glare glarendx glaze glrad histo \
ies2rad igraph lam lampcolor lookamb macbethcal markpath meta2tga \
mgf2inv mgf2meta mgf2rad mgfilt mkillum neat nff2rad normpat \
normtiff obj2mesh obj2rad objline objpict objview oconv oki20 \
oki20c pcomb pcompos pcond pcwarp pdelta pdfblur pexpand pextrem \
pfilt pflip phisto pinterp plot4 plotin pmblur protate psign psmeta \
psort pvalue ra_avs ra_bn ra_gif ra_hexbit ra_pict ra_ppm ra_pr \
ra_pr24 ra_ps ra_rgbe ra_t16 ra_t8 ra_tiff ra_xyze rad rad2mgf \
raddepend ranimate ranimove rcalc replmarks rhcopy rhinfo rholo \
rhoptimize rhpict rlux rmake rpict rpiece rtrace rview tabfunc \
thf2rad tmesh2rad total trad ttyimage vinfo vwrays vwright \
x11meta xform xglaresrc ximage xshowtrace xyzimage \
gencatenary rlam icalc neaten rvu radview rviewer)
	set conflict=`which $i`
	if (! $status ) then
		echo $conflict
	endif
end
