#!/bin/sh

if [ ! -d "$1" ]; then 
	echo Source view does not exist: $1
	exit
fi

if [ -e "$2" ]; then 
	echo Dest view already exists: $2
	exit
fi

cp -lR $1 $2
find $2 -type f -user $LOGNAME | xargs -r chmod ugo-w
find $2 -type d | xargs -r chmod u+w