use --max counter

This commit is contained in:
Jeff Carr 2025-09-09 12:38:30 -05:00
parent 519be64689
commit c8d67da4cc
2 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,7 @@ type args struct {
Force bool `arg:"--force" help:"rebuild everything"` Force bool `arg:"--force" help:"rebuild everything"`
Recursive bool `arg:"--recursive" help:"go-clone --recursive"` Recursive bool `arg:"--recursive" help:"go-clone --recursive"`
WITCOM bool `arg:"--witcom" help:"add the GPL header"` WITCOM bool `arg:"--witcom" help:"add the GPL header"`
Max int32 `arg:"--max" defauult:"40" help:"stop building after max builds"` Max int32 `arg:"--max" help:"stop building after max builds"`
} }
type EmptyCmd struct { type EmptyCmd struct {

View File

@ -73,8 +73,13 @@ func buildDeb() {
counter += 1 counter += 1
if int(argv.Max) == 0 {
argv.Max = 10
}
if counter > int(argv.Max) { if counter > int(argv.Max) {
okExit("did --max builds") log.Info("did --max builds", argv.Max)
okExit("")
} }
/* /*