aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-04-02 14:22:54 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-04-02 14:22:54 -0300
commit1d3f4f80a512e907ab45e2e00b96903c519ed5da (patch)
treea6faeeaaeb3ca94b69f3228f37534710d8c5fbc0
parent5dd8a464728885ecbb6f894aed111372aacd4606 (diff)
downloadkvmx-1d3f4f80a512e907ab45e2e00b96903c519ed5da.tar.gz
kvmx-1d3f4f80a512e907ab45e2e00b96903c519ed5da.tar.bz2
Use rsync to copy image files, falling back to cp
-rwxr-xr-xkvmx6
1 files changed, 5 insertions, 1 deletions
diff --git a/kvmx b/kvmx
index cdd0d39..5cf833c 100755
--- a/kvmx
+++ b/kvmx
@@ -244,7 +244,11 @@ function kvmx_up {
fi
echo "Copying base image $baseimage to $image..."
- cp $baseimage $image
+ if which rsync &> /dev/null; then
+ rsync -ah --progress $baseimage $image
+ else
+ cp $baseimage $image
+ fi
if [ -e "$basekey" ]; then
imagekey="`dirname $image`/ssh/`basename $image .img`.key"