blob: d0d17d42f2c31d800e56a1fdc195bcc626b8c0f5 [file] [log] [blame]
copyAndRemove ()
{
oldDir=${1}
newDir=${2}
if [ ! -d ${oldDir} ]
then
echo "${oldDir} does not exist"
return;
fi
echo "oldDir: ${oldDir}"
echo "newDir: ${newDir}"
mkdir -p ${newDir}
rsync --backup --recursive ${oldDir} ${newDir}
if [ "$?" -eq "0" ]
then
rm -fr ${oldDir}
fi
return;
}