Stubs in pm pull

This commit is contained in:
Stephen McQuay 2018-03-02 23:23:04 -08:00
parent d534949255
commit 49f82610a3
Signed by untrusted user: sm
GPG Key ID: 4E4B72F479BA3CE5
2 changed files with 14 additions and 1 deletions

View File

@ -18,8 +18,9 @@ const usage = `pm: simple, cross-platform system package manager
subcommands: subcommands:
environ (env) -- print environment information environ (env) -- print environment information
keyring (key) -- interact with pm's OpenPGP keyring keyring (key) -- interact with pm's OpenPGP keyring
remote -- configure remote pmd servers
package (pkg) -- create packages 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 const keyUsage = `pm keyring: interact with pm's OpenPGP keyring
@ -209,6 +210,10 @@ func main() {
default: default:
fatalf("unknown package subcommand: %q\n\nusage: %v", sub, remoteUsage) 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: default:
fatalf("uknown subcommand %q\n\nusage: %v", cmd, usage) fatalf("uknown subcommand %q\n\nusage: %v", cmd, usage)
} }

8
remote/pull.go Normal file
View File

@ -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")
}