diff --git a/cmd/pm/main.go b/cmd/pm/main.go index 5e380d1..8b3a0a5 100644 --- a/cmd/pm/main.go +++ b/cmd/pm/main.go @@ -18,8 +18,9 @@ const usage = `pm: simple, cross-platform system package manager subcommands: environ (env) -- print environment information keyring (key) -- interact with pm's OpenPGP keyring - remote -- configure remote pmd servers package (pkg) -- create packages + pull -- fetch all available packages from all configured remotes + remote -- configure remote pmd servers ` const keyUsage = `pm keyring: interact with pm's OpenPGP keyring @@ -209,6 +210,10 @@ func main() { default: fatalf("unknown package subcommand: %q\n\nusage: %v", sub, remoteUsage) } + case "pull": + if err := remote.Pull(root); err != nil { + fatalf("pulling available packages: %v\n", err) + } default: fatalf("uknown subcommand %q\n\nusage: %v", cmd, usage) } diff --git a/remote/pull.go b/remote/pull.go new file mode 100644 index 0000000..5204052 --- /dev/null +++ b/remote/pull.go @@ -0,0 +1,8 @@ +package remote + +import "github.com/pkg/errors" + +// Pull updates the available package database. +func Pull(root string) error { + return errors.New("NYI") +}