#!/bin/csh -f
# kopiert interaktiv zwei ganze Dirctory-Baeume
# auch auf anderen Rechner (wenn es dort einen geeigneten .rhosts-File gibt
if ($#argv != 0) then
 echo 'Aufruf nur cp_all'
 exit
endif
echo -n 'source-directory: '
set source = $<
if !(-d $source) then
 echo $source' ist kein Directory'
 exit
endif
echo -n 'target-directory: '
set target = $<
echo -n 'target-computer: '
set host = $<
if ($host == '') then
 if !(-d $target) then
  echo $target' ist kein Directory'
  exit
 endif
 cd $source; tar cf - . | (cd $target; tar xpf -)
else
 cd $source; tar cf - . | rsh $host cd $target \; tar xvfp -
endif
#
# oder (lt. SGI-pipeline):
# cd $source; find . -local -depth -print | cpio -pmudv $target
#
