
# This code creates the ICEM CFD Manager.
#
# Copyright (c) 1993 - 1996 Pacific Marketing and Consulting, Inc,
#       and ICEM Systems, GmbH.  All rights reserved.
# Author:  Wayne A. Christopher, wayne@icemcfd.com

# These pathnames are never the same and we can't trust people to have
# reasonable paths.

proc locate_useful_programs {} {
    set programs {
	uname
	whoami
	date
	vi
	xterm
	scrsave
	tar
	compress
	uncompress
	uuencode
	uudecode
	rcp
    }
    
    set directories {
	/bin
	/usr/bin
	/usr/sbin
	/usr/ucb
	/usr/bsd
	/usr/X11/bin
	/usr/bin/X11
	/usr/openwin/bin
	/usr/openwin3.0/bin
    }
    
    foreach p $programs {
	global ${p}_path
	foreach d $directories {
	    if [file exists $d/$p] {
		set ${p}_path $d/$p
		break
	    }
	}
	if {![info exists ${p}_path]} {
	    # nah
	    # puts stdout "Warning: can't find the \"$p\" program on this system"
	    set ${p}_path $p
	}
    }    
}
