summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/main.go b/main.go
index 8247ab4..fc97413 100644
--- a/main.go
+++ b/main.go
@@ -42,15 +42,8 @@ func main() {
log.Println("Starting craft")
defer log.Println("Exiting craft")
- source, err := os.MkdirTemp("", "*-craft")
- if err != nil {
- log.Fatal(err)
- }
- defer os.RemoveAll(source)
- checkout(repo, commit, source)
-
vm := qemu()
- err = vm.Start()
+ err := vm.Start()
if err != nil {
log.Fatal(err)
}
@@ -60,6 +53,14 @@ func main() {
log.Fatal(err)
}
}()
+
+ source, err := os.MkdirTemp("", "*-craft")
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer os.RemoveAll(source)
+ checkout(repo, commit, source)
+
waitBoot()
upload(source)