mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-15 08:47:48 +01:00
build: better division of prebuild stages.
This commit is contained in:
parent
88f1821b19
commit
fc85b9fc58
2 changed files with 4 additions and 1 deletions
|
@ -67,5 +67,6 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
cli.Configure()
|
||||||
cli.Prebuild()
|
cli.Prebuild()
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ func init() {
|
||||||
flag.StringVar(&file, "file", "", "Only prebuild a given file.")
|
flag.StringVar(&file, "file", "", "Only prebuild a given file.")
|
||||||
}
|
}
|
||||||
|
|
||||||
func Prebuild() {
|
func Configure() {
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
fmt.Printf("%s\n%s\n%s\n%s", usage,
|
fmt.Printf("%s\n%s\n%s\n%s", usage,
|
||||||
prebuild.Help("Prepare", prepare.Tasks),
|
prebuild.Help("Prepare", prepare.Tasks),
|
||||||
|
@ -103,7 +103,9 @@ func Prebuild() {
|
||||||
overwrite, _ := prepare.Tasks["overwrite"].(*prepare.Overwrite)
|
overwrite, _ := prepare.Tasks["overwrite"].(*prepare.Overwrite)
|
||||||
overwrite.OneFile = true
|
overwrite.OneFile = true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func Prebuild() {
|
||||||
logging.Step("Building apparmor.d profiles for %s on ABI%d.", prebuild.Distribution, prebuild.ABI)
|
logging.Step("Building apparmor.d profiles for %s on ABI%d.", prebuild.Distribution, prebuild.ABI)
|
||||||
if err := Prepare(); err != nil {
|
if err := Prepare(); err != nil {
|
||||||
logging.Fatal("%s", err.Error())
|
logging.Fatal("%s", err.Error())
|
||||||
|
|
Loading…
Reference in a new issue