#
echo "public" > temp$$.xxx
set curdir = `pwd|tr "/" " "`
set vaxdir="[public.xtal"
set xtalfound = ""
foreach name ($curdir)
   if ($name == xtal) then
      set xtalfound="1"
      continue
   endif
   if ($xtalfound) then
      set vaxdir="$vaxdir.$name"
   endif
end
set vaxdir="${vaxdir}]"
echo "cd $vaxdir" >> temp$$.xxx
if ($#argv) then
   set filespec = "$argv"
else
   set noglob
   echo -n "File name(s) (may have wildcard characters): "
   set filespec = $<
   unset noglob
endif
foreach curspec ($filespec)
   set files = `ls $curspec`
   foreach filnam ($files)
     echo "put $filnam" >>temp$$.xxx
   end
end
echo "quit" >> temp$$.xxx
ftp ccp4ws < temp$$.xxx
/bin/rm temp$$.xxx
