2021-03-24 17:16:17 +00:00
|
|
|
package csconfig
|
|
|
|
|
2023-10-18 07:38:33 +00:00
|
|
|
// HubConfig holds the configuration for a hub
|
|
|
|
type HubCfg struct {
|
|
|
|
HubIndexFile string // Path to the local index file
|
|
|
|
HubDir string // Where the hub items are downloaded
|
|
|
|
InstallDir string // Where to install items
|
|
|
|
InstallDataDir string // Where to install data
|
2021-03-24 17:16:17 +00:00
|
|
|
}
|
|
|
|
|
2023-10-18 07:38:33 +00:00
|
|
|
func (c *Config) loadHub() error {
|
2023-10-19 10:04:29 +00:00
|
|
|
|
|
|
|
// XXX: HubBranch too -- from cscli or chooseHubBranch() ?
|
|
|
|
|
2023-10-18 07:38:33 +00:00
|
|
|
c.Hub = &HubCfg{
|
2023-10-09 19:33:35 +00:00
|
|
|
HubIndexFile: c.ConfigPaths.HubIndexFile,
|
|
|
|
HubDir: c.ConfigPaths.HubDir,
|
|
|
|
InstallDir: c.ConfigPaths.ConfigDir,
|
|
|
|
InstallDataDir: c.ConfigPaths.DataDir,
|
2021-03-24 17:16:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|