command/build: Help text

pull/15/head
Mitchell Hashimoto 13 years ago
parent 74d812a766
commit 6bcd5de6f5

@ -5,18 +5,19 @@ import (
"github.com/mitchellh/packer/packer"
"io/ioutil"
"log"
"strings"
"sync"
)
type Command byte
func (Command) Help() string {
return "help"
return strings.TrimSpace(helpText)
}
func (Command) Run(env packer.Environment, args []string) int {
func (c Command) Run(env packer.Environment, args []string) int {
if len(args) != 1 {
env.Ui().Error("A single template argument is required.")
env.Ui().Say(c.Help())
return 1
}

@ -0,0 +1,8 @@
package build
const helpText = `
Usage: packer build TEMPLATE
Will execute multiple builds in parallel as defined in the template.
The various artifacts created by the template will be outputted.
`
Loading…
Cancel
Save