Move runtime around
This commit is contained in:
parent
ef1243ea39
commit
feacd4eeae
18 changed files with 39 additions and 35 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
"path/filepath"
|
||||
|
||||
wisski_distillery "github.com/FAU-CDI/wisski-distillery"
|
||||
cfg "github.com/FAU-CDI/wisski-distillery/internal/config"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/config"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/core"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/fsx"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/hostname"
|
||||
|
|
@ -188,11 +188,11 @@ func (bs bootstrap) Run(context wisski_distillery.Context) error {
|
|||
}
|
||||
defer f.Close()
|
||||
|
||||
var config cfg.Config
|
||||
if err := config.Unmarshal(f); err != nil {
|
||||
var cfg config.Config
|
||||
if err := cfg.Unmarshal(f); err != nil {
|
||||
return errBootstrapOpenConfig.WithMessageF(err)
|
||||
}
|
||||
context.Println(config)
|
||||
context.Println(cfg)
|
||||
|
||||
// Tell the user how to proceed
|
||||
logging.LogMessage(context.IOStream, "Bootstrap is complete")
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ import (
|
|||
)
|
||||
|
||||
// Config is the configuration command
|
||||
var Config wisski_distillery.Command = config{}
|
||||
var Config wisski_distillery.Command = cfg{}
|
||||
|
||||
type config struct {
|
||||
type cfg struct {
|
||||
}
|
||||
|
||||
func (s config) Description() wisski_distillery.Description {
|
||||
func (s cfg) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: core.Requirements{
|
||||
NeedsDistillery: true,
|
||||
|
|
@ -21,7 +21,7 @@ func (s config) Description() wisski_distillery.Description {
|
|||
}
|
||||
}
|
||||
|
||||
func (s config) Run(context wisski_distillery.Context) error {
|
||||
func (s cfg) Run(context wisski_distillery.Context) error {
|
||||
context.Printf("%#v", context.Environment.Config)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
wisski_distillery "github.com/FAU-CDI/wisski-distillery"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/component"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/config"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/core"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/execx"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/logging"
|
||||
|
|
@ -142,7 +143,7 @@ func (si systemupdate) Run(context wisski_distillery.Context) error {
|
|||
}
|
||||
|
||||
if err := logging.LogOperation(func() error {
|
||||
return unpack.InstallDir(dis.RuntimeDir(), "runtime", core.Runtime, func(dst, src string) {
|
||||
return unpack.InstallDir(dis.Config.RuntimeDir(), "runtime", config.Runtime, func(dst, src string) {
|
||||
context.Printf("[copy] %s\n", dst)
|
||||
})
|
||||
}, context.IOStream, "Unpacking Runtime Components"); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue