mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-09-16 02:26:12 +00:00
Added 'update' subcommand and small fix to the 'install' subcommand
This commit is contained in:
+7
-6
@@ -14,12 +14,7 @@ type BPMConfigStruct struct {
|
||||
Repositories []*Repository `yaml:"repositories"`
|
||||
}
|
||||
|
||||
var BPMConfig BPMConfigStruct = BPMConfigStruct{
|
||||
CompilationEnv: make([]string, 0),
|
||||
SilentCompilation: false,
|
||||
BinaryOutputDir: "/var/lib/bpm/compiled/",
|
||||
CompilationDir: "/var/tmp/",
|
||||
}
|
||||
var BPMConfig BPMConfigStruct
|
||||
|
||||
func ReadConfig() {
|
||||
if _, err := os.Stat("/etc/bpm.conf"); os.IsNotExist(err) {
|
||||
@@ -29,6 +24,12 @@ func ReadConfig() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
BPMConfig = BPMConfigStruct{
|
||||
CompilationEnv: make([]string, 0),
|
||||
SilentCompilation: false,
|
||||
BinaryOutputDir: "/var/lib/bpm/compiled/",
|
||||
CompilationDir: "/var/tmp/",
|
||||
}
|
||||
err = yaml.Unmarshal(bytes, &BPMConfig)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user