diff options
author | Timothy Day <timday@amazon.com> | 2024-08-09 21:36:04 -0400 |
---|---|---|
committer | Timothy Day <timday@amazon.com> | 2024-08-09 21:36:04 -0400 |
commit | ceabdf74bb35a554406aaddc53d22db003087bf3 (patch) | |
tree | 85ccf54bb4cc1667bd54baf2760b22b9334118f1 | |
parent | c9fab303c57991ff80838ba31f829a589103db75 (diff) |
root_image: remove cp image from sync command
This can add around a minute of run time for very little
benefit. If the image gets corrupted, it can easily be
regenerated.
Signed-off-by: Timothy Day <timday@amazon.com>
-rwxr-xr-x | root_image | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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() |