#!/bin/csh -f
#*****************************************************************************
#                                                                            *
#            Copyright (C) 1993, Alias Research, Inc.                        *
#                                                                            *
#    These coded instructions,  statements and  computer programs contain    *
#    unpublished information proprietary to Alias Research, Inc.  and are    *
#    protected by the Canadian and US Federal copyright law. They may not    *
#    be disclosed to third parties  or copied  or duplicated, in whole or    *
#    in part,  without the prior written consent of Alias Research,  Inc.    *
#                                                                            *
# Unpublished-rights reserved under the Copyright Laws of the United States. *
#                                                                            *
#****************************************************************************/
#
#       $Source: /tmp_mnt/repo/root/v/alias3.2.2/src/Gifts/bin/RCS/drender_log.csh.sgi,v $
#       $Author: psantan $ $Date: 93/06/23 16:05:48 $
#
#

if (! $?ALIAS_LOCATION ) then
    echo "ALIAS_LOCATION environment variable must be set to install drender"
    exit -1
else
    set NT_DR=${ALIAS_WORKENV}/user_data/demo/misc_data/dlog.pst
    set NT_TMP=/usr/tmp/DRL.$$

    pst ${NT_DR}
    if ( $status == "1" ) then
        exit 1
    endif

    set NT_MACHINES=(`pstget ${NT_DR} '*.hosts' 'all'`)

    if ( "${NT_MACHINES}" == "all" || "${NT_MACHINES}" == "ALL" || "${NT_MACHINES}" == "" ) then
        set NT_FILTER='*'
    else
        set NT_FILTER="${NT_MACHINES}"
    endif

    pushd ${NT_MASTER_DIR}/log > /dev/null

    foreach mach ( ${NT_FILTER} )

        if ( "${mach}" == "localhost" ) then

            set machn=`hostname`
        else

            set machn=${mach}
        endif

        echo "***   Log file for machine ${mach}   ***"
        cat ${machn}
    end

    popd > /dev/null

endif






