Add support for dependency & architectures as common options.

This commit is contained in:
Andrey Smirnov
2014-01-12 23:55:58 +04:00
parent f9853de144
commit d684c87fd1
6 changed files with 50 additions and 35 deletions
+12 -4
View File
@@ -8,14 +8,22 @@ import (
// ConfigStructure is structure of main configuration
type ConfigStructure struct {
RootDir string `json:"rootDir"`
DownloadConcurrency int `json:"downloadConcurrency"`
RootDir string `json:"rootDir"`
DownloadConcurrency int `json:"downloadConcurrency"`
Architectures []string `json:"architectures"`
DepFollowSuggests bool `json:"dependencyFollowSuggests"`
DepFollowRecommends bool `json:"dependencyFollowRecommends"`
DepFollowAllVariants bool `json:"dependencyFollowAllVariants"`
}
// Config is configuration for aptly, shared by all modules
var Config = ConfigStructure{
RootDir: filepath.Join(os.Getenv("HOME"), ".aptly"),
DownloadConcurrency: 4,
RootDir: filepath.Join(os.Getenv("HOME"), ".aptly"),
DownloadConcurrency: 4,
Architectures: []string{},
DepFollowSuggests: false,
DepFollowRecommends: false,
DepFollowAllVariants: false,
}
// LoadConfig loads configuration from json file