From 104d1dac44a0a46275f20ac029ca51afd2bc8a9c Mon Sep 17 00:00:00 2001 From: rickpeters Date: Mon, 28 Sep 2026 18:27:27 +0200 Subject: [PATCH] fix: vmreset.sh works when the VM lives in the repo itself (cp of run.sh onto itself failed) --- scripts/vmreset.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vmreset.sh b/scripts/vmreset.sh index dcbe901..b8190f6 100755 --- a/scripts/vmreset.sh +++ b/scripts/vmreset.sh @@ -23,7 +23,7 @@ fi echo "Restoring snapshot '$SNAPSHOT' in $VM_DIR..." cd "$VM_DIR" # Always this repo's run.sh: a copy in $VM_DIR falls behind (VM_CACHE, ...). -cp "$repo_dir/run.sh" run.sh +[[ "$repo_dir/run.sh" -ef run.sh ]] || cp "$repo_dir/run.sh" run.sh qemu-img snapshot -a "$SNAPSHOT" disk.qcow2 cp "vars.$SNAPSHOT.fd" vars.fd