USAGE1="missing args: sourcedir destdir"
USAGE2="invalid directory"

if test "$1" = ""; then
    echo $USAGE1
    exit 1 
    fi
if test ! -d $1; then
    echo $USAGE2 $1
    exit 1 
    fi 

if test "$2" = ""; then
    echo $USAGE1
    exit 1 
    fi
if test ! -r $2; then
    mkdir $2
    fi 
if test ! -d $2; then
    echo $USAGE2 $2
    exit 1 
    fi 


cd $1; tar cf - .| (cd $2; tar xf -)
