blob: 041480182613847eda9b150ee74814c619b8f452 [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;
}
copyAndRemoveModule () {
oldBaseDir=$[1}
newBaseDir=$[2}
wtpmodule=${3}
oldDir=${oldBaseDir}/${wtpmodule}
newDir=${newBaseDir}
copyAndRemove $oldDir $newDir
return;
}