#!/bin/csh -f
#
# slf 20-dec-1994
# cp file to all local home directories
# calling sequence:
#   cphome <file>
#
# Restrictions:
#    assume links /?p exist (0p, 1p, etc) point to local people areas
#    ultrix only
#
if ($#argv == 0) then 
   echo "No file name supplied..."
   exit
endif

set file=$argv[1]
if (!(-e $file)) then
   echo "File: "$file" not found..."
   exit
endif

set homes=`/bin/ls -d /?p/freeland`
foreach home ($homes)
   set cmd=`cp -pf ""$file"" ""$home`
   echo $cmd
   $cmd
   if ($status == 0) then
      echo "cp -pf "$file" "$home
   endif
end
exit
