:
# cptree olddir newdir
#
# This script uses cpio to make a copy of the file tree olddir to newdir.
# The copy is not linked to the old.  See lntree for a version that links.
#
if [ $# != 2 ];then echo Usage: $0 olddir newdir; exit 1; fi
case $1 in
	/*) src=$1;;
	 *) src=`pwd`/$1;;
esac
case $2 in
	/*) dst=$2;;
	 *) dst=`pwd`/$2;;
esac
test -d $src || { echo No directory $src; exit 1; }
test -d $dst || mkdir -p $dst

cd $src
find . -print | cpio -pdum $dst
