Skip to content

Commit

Permalink
build: better division of prebuild stages.
Browse files Browse the repository at this point in the history
  • Loading branch information
roddhjav committed Jan 12, 2025
1 parent 88f1821 commit fc85b9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/prebuild/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ func init() {
}

func main() {
cli.Configure()
cli.Prebuild()
}
4 changes: 3 additions & 1 deletion pkg/prebuild/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit fc85b9f

Please sign in to comment.