summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xroot_image6
1 files changed, 2 insertions, 4 deletions
diff --git a/root_image b/root_image
index 1366af9..687560d 100755
--- a/root_image
+++ b/root_image
@@ -309,16 +309,14 @@ cmd_sync()
MNT="$(mktemp --tmpdir -d $(basename "$0")-XXXXXXXXXX)"
trap 'umount_image' EXIT
- cp "$ktest_image" "$ktest_image".new
- mount "$ktest_image".new "$MNT"
+ mount "$ktest_image" "$MNT"
rm -rf "$MNT/workspace/$source_dir"
mkdir -p "$MNT/workspace/$source_dir"
rsync --archive -r "$source" "$MNT/workspace/$source_dir"
umount_image
- trim_image "$ktest_image".new
- mv "$ktest_image".new "$ktest_image"
+ trim_image "$ktest_image"
}
cmd_create()