#!/bin/csh
# this script copies the formatted pips.sources file
# to ti_data.  This file on ti_data is used by
# techinfo to display a document listing contacts
# for all sources.
# this script runs from cron

set LOCAL_SOURCES = "/tmp/sources.txt"
set REMOTE_SOURCES = "/mit/ti_data/admin/sources"

set KRBTKFILE="/tmp/sources_tkt"
/var/ti/local/krbtgp -s -keyfile /etc/ti_serve_key ti_serve

# create sources document
if ( -r $LOCAL_SOURCES ) then
	rm $LOCAL_SOURCES
endif

csh -f /var/ti/util/format.pips.sources > $LOCAL_SOURCES

attach ti_data
cp $LOCAL_SOURCES $REMOTE_SOURCES

# remove ticket file
kdestroy

# cleanup
rm $LOCAL_SOURCES

