#!/bin/sh
 
. "$MAINTENANCE_DIR_ROOT/core/bin/perform"

APPLICATION="copy"

if [ $# != 2 ]
then
	echo "Usage: $APPLICATION <source> <destination>"
	exit 1
fi

SRC=$1
DST=$2

#echo "Copying the contents of: $SRC into $DST"
# create a backup copy
perform "cp -R $SRC $SRC.$MAINTENANCE_SUFFIX"
# prepare the file
perform "cp -R $SRC $DST.$MAINTENANCE_SUFFIX"
# move
perform "mv $DST.$MAINTENANCE_SUFFIX $DST"
