2018-11-23 09:11:18 +00:00
|
|
|
// Copyright 2018 Mikhail Klementev. All rights reserved.
|
|
|
|
// Use of this source code is governed by a AGPLv3 license
|
|
|
|
// (or later) that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/naoina/toml"
|
2019-02-02 21:24:29 +00:00
|
|
|
|
|
|
|
"code.dumpstack.io/tools/out-of-tree/config"
|
2018-11-23 09:11:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func genConfig(at config.ArtifactType) (err error) {
|
|
|
|
a := config.Artifact{
|
|
|
|
Name: "Put name here",
|
|
|
|
Type: at,
|
|
|
|
}
|
|
|
|
a.SupportedKernels = append(a.SupportedKernels, config.KernelMask{
|
2018-12-09 22:50:37 +00:00
|
|
|
DistroType: config.Ubuntu,
|
|
|
|
DistroRelease: "18.04",
|
|
|
|
ReleaseMask: ".*",
|
2018-11-23 09:11:18 +00:00
|
|
|
})
|
2020-06-14 20:14:59 +00:00
|
|
|
a.Preload = append(a.Preload, config.PreloadModule{
|
2022-02-16 20:35:06 +00:00
|
|
|
Repo: "Repo name (e.g. https://github.com/openwall/lkrg)",
|
2020-06-14 20:14:59 +00:00
|
|
|
})
|
2018-11-23 09:11:18 +00:00
|
|
|
|
|
|
|
buf, err := toml.Marshal(&a)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Print(string(buf))
|
|
|
|
return
|
|
|
|
}
|