// Copy uses rsync to copy one or more src files to dst. func (c Client) Copy(dst string, src ...string) error { cmd, err := c.Command(dst, src...) if err != nil { return err } return exec.RunCommand(cmd) }
// RunCommand uses ssh to execute a command on a remote machine. func (c Client) RunCommand(args []string) error { if len(args) == 0 { return errors.New("no command given") } if c.Host == "" { return errors.New("no host given") } return exec.RunCommand(c.Command(args)) }
// RunCommand runs the specified command on the host system. func (drv Driver) RunCommand(args []string) error { return exec.RunCommand(args) }
// Resolve runs Librarian-Chef to install cookbook dependencies to dst. func (r Resolver) Resolve(dst string) error { return exec.RunCommand(Command(dst)) }
// Resolve runs Berkshelf to install cookbook dependencies to dst. func (r Resolver) Resolve(dst string) error { if err := os.RemoveAll(dst); err != nil { return err } return exec.RunCommand(Command(dst)) }