blob: 02602b6fff19b27fee1bade5ba408d4fc2bf35ef [file] [log] [blame]
Sean McCullough83c5be62025-06-12 15:42:40 -07001package main
2
3import (
4 "flag"
5 "fmt"
6 "log"
7 "os/exec"
8 "path/filepath"
9
10 "sketch.dev/webui"
11)
12
13func main() {
14 dest := flag.String("dest", ".", "destination directory")
15 flag.Parse()
16
17 // Make sure that the webui is built so we can copy the results to the container.
18 _, err := webui.Build()
19 if err != nil {
20 log.Fatal(err.Error())
21 }
22
23 webuiZipPath, err := webui.ZipPath()
24 if err != nil {
25 log.Fatal(err.Error())
26 }
27 cmd := exec.Command("cp", webuiZipPath, filepath.Join(*dest, "."))
28 if err := cmd.Run(); err != nil {
29 log.Fatal(err.Error())
30 }
31
32 fmt.Printf("webuiZipPath: %v copied to %s\n", webuiZipPath, *dest)
33}