From fc85b9fc58d814c5029c0e377cde5c65c07eff2a Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 12 Jan 2025 19:41:47 +0100 Subject: [PATCH] build: better division of prebuild stages. --- cmd/prebuild/main.go | 1 + pkg/prebuild/cli/cli.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/prebuild/main.go b/cmd/prebuild/main.go index 3f2dd9f43..59eff4912 100644 --- a/cmd/prebuild/main.go +++ b/cmd/prebuild/main.go @@ -67,5 +67,6 @@ func init() { } func main() { + cli.Configure() cli.Prebuild() } diff --git a/pkg/prebuild/cli/cli.go b/pkg/prebuild/cli/cli.go index 2821d52c2..53f3c5589 100644 --- a/pkg/prebuild/cli/cli.go +++ b/pkg/prebuild/cli/cli.go @@ -58,7 +58,7 @@ func init() { flag.StringVar(&file, "file", "", "Only prebuild a given file.") } -func Prebuild() { +func Configure() { flag.Usage = func() { fmt.Printf("%s\n%s\n%s\n%s", usage, prebuild.Help("Prepare", prepare.Tasks), @@ -103,7 +103,9 @@ func Prebuild() { overwrite, _ := prepare.Tasks["overwrite"].(*prepare.Overwrite) overwrite.OneFile = true } +} +func Prebuild() { logging.Step("Building apparmor.d profiles for %s on ABI%d.", prebuild.Distribution, prebuild.ABI) if err := Prepare(); err != nil { logging.Fatal("%s", err.Error())