first draft of miasma installer
This commit is contained in:
25
main.go
Normal file
25
main.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"miasma-installer/tui"
|
||||
"os"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
func main() {
|
||||
p := tea.NewProgram(tui.NewModel(), tea.WithAltScreen())
|
||||
|
||||
if _, err := p.Run(); err != nil {
|
||||
fmt.Printf("An error has occured during installation: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
finalModel, _ := p.Run()
|
||||
if root, ok := finalModel.(tui.RootModel); ok {
|
||||
if root.State == tui.StateFinished {
|
||||
fmt.Println("\nMiasma OS Installation Complete! Please reboot.")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user