Change parameters to cp for image copy

This will speed up the copy process on some filesystems by writing less to the disk. CoW filesystems will perform the best
This commit is contained in:
Drew Bonasera 2016-04-28 02:10:01 -04:00
parent ed4bcea683
commit 0b8020ac18
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ fi
#Copy to new file if requested #Copy to new file if requested
if [ -n "$2" ]; then if [ -n "$2" ]; then
echo "Copying $1 to $2..." echo "Copying $1 to $2..."
cp "$1" "$2" cp --reflink=auto --sparse=always "$1" "$2"
if (( $? != 0 )); then if (( $? != 0 )); then
echo "ERROR: Could not copy file..." echo "ERROR: Could not copy file..."
exit -5 exit -5