]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Try rsync on kvmx_clone
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 12 May 2017 16:59:24 +0000 (13:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 12 May 2017 16:59:24 +0000 (13:59 -0300)
kvmx

diff --git a/kvmx b/kvmx
index e96054c7e6c590c9ba3ab2c8e69d3f2c1e8406d2..27ac049c37428084c1e971501f5cb952cc4c99a8 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -717,7 +717,14 @@ function kvmx_clone {
   rmdir $FOLDER
 
   # Copy image and configuration
-  cp -r `dirname $image` $FOLDER/
+  echo "Copying basebox..."
+  if which rsync &> /dev/null; then
+    rsync -ah --progress `dirname $image`/ $FOLDER/
+  else
+    cp -r `dirname $image` $FOLDER/
+  fi
+
+  # Create config entry
   ( cd $GLOBAL_USER_CONFIG_FOLDER && ln -s $FOLDER/kvmxfile $DEST )
 
   # Update config file