#!/bin/csh
#
# S.L. Freeland 3-Nov-1993 (usually run from ys_install)
#
# ys_install.ftpget
# get required compressed tar files from master host
# 
if ((!($?ys)) || (!($?yssw_dodata))) then
   echo Run this script via ys_install front end, exiting
   exit
endif

set host=`hostname`
cd $ys/swmaint/tar
set ftpget = $ys/swmaint/script/gettar.ftp
echo Generating ftp transfer script
#### build ftp script
echo open 133.74.8.100 	 	>  $ftpget
echo user ftp $host	 	>> $ftpget
echo binary		 	>> $ftpget
echo cd pub/swmaint/tar	 	>> $ftpget
echo mget 'ys*.Z '       	>> $ftpget
if ($yssw_dodata == "1") then
   if($?yssw_dbase_sets) then 
      foreach seti ($yssw_dbase_sets)
         echo get ydb_$seti'.tar.Z' >> $ftpget      
      end
   else
      echo mget 'ydb*.Z '	>> $ftpget
   endif
endif
echo bye		 	>> $ftpget
####
echo Starting transfer of compressed tar files...
ftp -in < $ftpget
echo Transfer complete
exit
