diff options
| -rw-r--r-- | argv.go | 3 | ||||
| -rw-r--r-- | doDebian.go | 2 | ||||
| -rw-r--r-- | doGit.go | 2 | ||||
| -rw-r--r-- | doRdate.go | 11 | ||||
| -rw-r--r-- | main.go | 5 |
5 files changed, 20 insertions, 3 deletions
@@ -28,6 +28,7 @@ type args struct { ListPkgs *EmptyCmd `arg:"subcommand:list" help:"list all the packages on mirrors.wit.com"` Test *EmptyCmd `arg:"subcommand:test" help:"test build everything first"` Clone *EmptyCmd `arg:"subcommand:repomap-clone" help:"go-clone from a gowebd repomap"` + Rdate *EmptyCmd `arg:"subcommand:rdate" help:"standard rdate"` Upgrade *DefaultCmd `arg:"subcommand:upgrade" help:"apt upgrade packages installed from mirrors.wit.com"` RepoMap string `arg:"--repomap" help:"location of the repomap"` Release bool `arg:"--release" help:"use go-deb --release"` @@ -100,7 +101,7 @@ func (args) Appname() string { func (a args) DoAutoComplete(pb *prep.Auto) { if pb.Cmd == "" { - pb.Autocomplete3([]string{"push", "build", "debian", "--install", "upgrade", "macos", "git", "--witcom --version --dry-run --force"}) + pb.Autocomplete3([]string{"--verbose", "--force", "push", "build", "debian", "upgrade", "macos", "git", "rdate"}) } else { pb.SubCommand(pb.Goargs...) } diff --git a/doDebian.go b/doDebian.go index 21571c2..5bdf614 100644 --- a/doDebian.go +++ b/doDebian.go @@ -39,7 +39,7 @@ func doDebian() { okExit("") } - me.forge.ConfigRill(5, 5) + me.forge.ConfigRill(16, 16) stats := me.forge.RunOnRepos(found, buildDeb) for s, stat := range stats { log.Info(s, stat.Err) @@ -27,7 +27,7 @@ func findRepo(wpath string) (*gitpb.Repo, bool) { func doPull(wpath string) { repo, ok := findRepo(wpath) - if ok { + if !ok { return } os.Chdir(repo.FullPath) diff --git a/doRdate.go b/doRdate.go new file mode 100644 index 0000000..244b7c1 --- /dev/null +++ b/doRdate.go @@ -0,0 +1,11 @@ +// Copyright 2017-2025 WIT.COM Inc. All rights reserved. +// Use of this source code is governed by the GPL 3.0 + +package main + +func doRdate() { + checkSuperuser() + + exitOnError([]string{"rdate", "rdate.grid.wit.com"}) + exitOnError([]string{"hwclock", "-w"}) +} @@ -34,6 +34,11 @@ func main() { okExit("") } + if argv.Rdate != nil { + doRdate() + okExit("") + } + if argv.Git != nil { doGit() okExit("") |
