#!/bin/sh
#
# cpsimple: recursive directory copy, then delete .svn sub dirs.

if [ $(basename "$1") = $(basename "$2") -a -d $2 ]; then
  DESTDIR=$(dirname "$2")
else
  DESTDIR=$2
fi

echo cp -pr $1 $DESTDIR
cp -pr $1 $DESTDIR

echo find $2 '-name .svn -prune -exec rm -fr {} \;'
find $2 -name .svn -prune -exec rm -fr {} \;

exit 0
