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:
parent
ed4bcea683
commit
0b8020ac18
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue