Skip to content

Commit

Permalink
kernel: mount jazz-todo if jazz is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
progrium committed Apr 2, 2024
1 parent e410f4b commit 46f0891
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kernel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"syscall/js"

fsutil "tractor.dev/toolkit-go/engine/fs"
fsutil2 "tractor.dev/wanix/internal/fsutil"
"tractor.dev/wanix/internal/jsutil"
"tractor.dev/wanix/internal/mountablefs"
"tractor.dev/wanix/kernel/fs"
Expand Down Expand Up @@ -71,6 +72,16 @@ func main() {
if err != nil {
fmt.Println(err)
}
ok, err := fsutil.Exists(kernel.fs.FS(), "grp/app/grp-todo")
if err != nil {
fmt.Println(err)
}
if !ok {
fsutil.MkdirAll(kernel.fs.FS(), "grp/app", 0755)
if err := fsutil2.CopyAll(kernel.fs.FS(), "sys/app/jazz-todo", "grp/app/grp-todo"); err != nil {
fmt.Println(err)
}
}
}

}
Expand Down

0 comments on commit 46f0891

Please sign in to comment.