diff --git a/cmd/cmd.go b/cmd/cmd.go index 86df0f33..cbd9ef55 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -3,12 +3,13 @@ package cmd import ( "fmt" + "os" + "time" + "github.com/smira/aptly/aptly" "github.com/smira/aptly/deb" "github.com/smira/commander" "github.com/smira/flag" - "os" - "time" ) // ListPackagesRefList shows list of packages in PackageRefList @@ -65,6 +66,7 @@ fine-grained changes in repository contents to transition your package environment to new version.`, Flag: *flag.NewFlagSet("aptly", flag.ExitOnError), Subcommands: []*commander.Command{ + makeCmdConfig(), makeCmdDb(), makeCmdGraph(), makeCmdMirror(), diff --git a/cmd/config.go b/cmd/config.go new file mode 100644 index 00000000..5eb27307 --- /dev/null +++ b/cmd/config.go @@ -0,0 +1,15 @@ +package cmd + +import ( + "github.com/smira/commander" +) + +func makeCmdConfig() *commander.Command { + return &commander.Command{ + UsageLine: "config", + Short: "manage aptly configuration", + Subcommands: []*commander.Command{ + makeCmdConfigShow(), + }, + } +} diff --git a/cmd/config_show.go b/cmd/config_show.go new file mode 100644 index 00000000..ef7ea040 --- /dev/null +++ b/cmd/config_show.go @@ -0,0 +1,31 @@ +package cmd + +import "fmt" +import "github.com/smira/commander" + +func aptlyConfigShow(cmd *commander.Command, args []string) error { + + config := context.Config() + + fmt.Printf("RootDir: %s") + + return nil + +} + +func makeCmdConfigShow() *commander.Command { + cmd := &commander.Command{ + Run: aptlyConfigShow, + UsageLine: "show", + Short: "show current aptly's config", + Long: ` +Command show displays the current aptly configuration. + +Example: + + $ aptly config show + +`, + } + return cmd +}